Implement a disjoint set, also called union-find, that starts with every element in its own set and supports find to get a set's representative and union to merge two sets.
Loading content...