FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

javascript-algorithms/src/data-structures/disjoint-set at master · funya/javascript-algorithms · GitHub

Latest commit

 

History

History
 
 

README.md

Disjoint Set

Read this in other languages: Русский, Português

Disjoint-set data structure (also called a union–find data structure or merge–find set) is a data structure that tracks a set of elements partitioned into a number of disjoint (non-overlapping) subsets. It provides near-constant-time operations (bounded by the inverse Ackermann function) to add new sets, to merge existing sets, and to determine whether elements are in the same set. In addition to many other uses (see the Applications section), disjoint-sets play a key role in Kruskal's algorithm for finding the minimum spanning tree of a graph.

MakeSet creates 8 singletons.

After some operations of Union, some sets are grouped together.

References


Back | FazBrowse Home | New Git URL