Disjoint-set data structure: Difference between revisions

Content deleted Content added
Dcoetzee (talk | contribs)
Revised intro
Dcoetzee (talk | contribs)
m sets->groups in second para
Line 4:
The other important operation, '''MakeSet''', which makes a group containing only a given element (a [[singleton]]), is generally trivial. With these three operations, many practical partitioning problems can be solved (see the ''Applications'' section).
 
While we could represent the setsgroups themselves as objects and have the operations operate on these sets, the more common approach is to choose an element from each setgroup as a ''representative''; then, '''Find''' returns the representative of the setgroup that the given element is in, and '''Union''' takes the representatives of two given setsgroups.
 
== Disjoint-set linked lists ==