Glossary: Algorithms Beyond the Basics in Java
union-find
Also written: disjoint set union, DSU
A structure that tracks which items are in the same group as links arrive, with fast `find` and `union`. It answers "are these two cafés in the same pool?" in nearly constant time.
Where the book teaches it
Related terms
find (union-find)path compressionunion by sizeconnected componentKruskal's algorithm