Graph AlgorithmsUnion-Find (Disjoint Set Union)
Union-Find (Disjoint Set Union)
Maintains a partition of elements into disjoint sets with near-constant-time union and find via rank and path compression.
Intermediatedisjoint setunion by rankpath compressionconnectivity
Loading visualization…