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
Each element stores a parent pointer forming a forest of trees. find() walks the chain; union() re-points one root. Trees can grow tall — O(n) worst case.
…
Complexity
What is the worst-case time for find() in Quick Union?