Skip to content

Glossary: Coding Interviews in C++

Union-find

Also written: disjoint set

A structure that tracks which items belong to the same group and can quickly merge two groups. It is used for questions about connected or merging groups.

Where the book teaches it

Related terms

GreedyTopological sort