Union-Find Structure
A union-find structure maintains a collection of sets. The sets are disjoint, so no element belongs to more than one set. Two $\cal(\log n)$ time operations are supported: the unite operation joins two sets, and the find operation finds the representative of the set that contains a given element.