This is a data structure used to maintain a collection of disjoint sets. It supports operations like makeSet, union and find, which are used to form new sets, merge existing sets and determine the set membership of an element respectively.
This is a data structure used to maintain a collection of disjoint sets. It supports operations like makeSet, union and find, which are used to form new sets, merge existing sets and determine the set membership of an element respectively.