Expand description
Union-Find (Disjoint Set) data structure.
Union-Find efficiently tracks connected components in undirected graphs. Supports:
find(x): Find representative of x’s componentunion(x, y): Merge components containing x and y
Uses path compression and union by rank for near O(1) amortized operations.
Structs§
- Union
Find - Union-Find data structure with path compression and union by rank.
Functions§
- union_
find_ parallel - Parallel union-find using Shiloach-Vishkin style algorithm.
- union_
find_ sequential - Sequential union-find on edge list.