It is sometimes necessary to determine quickly whether two elements belong to the same set or to different sets. This is called “disjoint sets” and can be solved very efficiently using an up-tree datastructure.

Slides