6 ms·
Is there a name for the data structure/algorithm?
by JamesUtah07 4y ago
Is there a name for the data structure/algorithm?
- deleted 4y ago[deleted]
- whoisburbansky 4y agoIt's called union-find, but also disjoint-set sometimes. The process of reparenting nodes is called path compression, and the optimization of using the larger set of the two as the parent when merging is usually just called "union by rank." Any of those terms should give you more details upon search.
- lenocinor 4y agohttps://en.m.wikipedia.org/wiki/Disjoint-set_data_structure https://en.m.wikipedia.org/wiki/Disjoint-set_data_structure
- deleted 4y ago[deleted]