Adds an element as a new set
(Any)
DisjointSetNode
:
Object holding the element
Merges the sets that contain x and y
(DisjointSetNode)
(DisjointSetNode)
Finds and returns the root node of the set that contains node
(DisjointSetNode)
DisjointSetNode
:
Returns true if x and y belong to the same set
(DisjointSetNode)
(DisjointSetNode)