Union-Find
Loading visualizer…
Initialize
0
01
12
23
34
45
56
67
70
1
2
3
4
5
6
7
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Union-Find
Loading visualizer…
Initialize
Union-Find
Always attach the shallower tree under the deeper one. Rank labels on every node show the decision. Tree height stays bounded at O(log n).
…
Complexity
When does union by rank increment a root's rank?