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
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
timeline0 / 0
←→space walk steps