Union-Find (DSU) with union-by-rank and path compression on 8 nodes.

DSU forest · union-by-rank + path compression root find path new parent
parent[i] · rank[i]
Scripted op sequence
none
Step 0 / 0

Press Play. Every node starts as its own root. Watch union-by-rank merge them; find calls collapse the path.

Speed
components
8
ops done
0
max rank
0
progress
0%
timeline0 / 0
space walk steps