Disjoint-Set/Union-Find Data Structure

Disjoint-Set/Union-Find Data Structure

A disjoint-set, or union-find as it's also commonly referred, is a data structure that tracks a set of elements partitioned into a group of discontinuous subsets. In this post, I'll highlight a few algorithms that may come in handy when dealing with these types of data structures.