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 flat component ID. find() is O(1); union() must relabel the entire array — O(n) per call.
…
Complexity
Legend
What is the time complexity of find() in Quick Find?