Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 528 Bytes

README.md

File metadata and controls

7 lines (5 loc) · 528 Bytes

Disjoint-set data structure

Disjoint-set for GO. In computing, a disjoint-set data structure is a data structure that keeps track of a set of elements partitioned into a number of disjoint (nonoverlapping) subsets. A union-find algorithm is an algorithm that performs two useful operations on such a data structure:

  1. Find: Determine which subset a particular element is in. This can be used for determining if two elements are in the same subset.
  2. Union: Join two subsets into a single subset.