A data structure that stores a collection of disjoint (non-overlapping) sets.
It provides operations for:
- adding new sets,
- merging sets (replacing them by their union), and
- finding a representative member of a set.
Importantly, Kruskal’s algorithm uses the disjoint-set data structure to efficiently determine whether two vertices are part of the same tree.