Home▸Algorithms & AI▸2D Union-Find: Disjoint-Set Forest, Union by Rank and Path Compression

🌳 2D Union-Find: Disjoint-Set Forest, Union by Rank and Path Compression

Canvas disjoint-set forest with parent array, tree diagram and live cost chart: choose union by rank, size or naive linking and full compression, halving or splitting, run Kruskal MST, and compare mean hops with the inverse-Ackermann bound.

Algorithms & AI2DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 3D version
2D Union-Find: Disjoint-Set Forest, Union by Rank and Path Compression ↗ Open standalone
⚙ Under the hood

Canvas disjoint-set forest with parent array, tree diagram and live cost chart: choose union by rank, size or naive linking and full compression, halving or splitting, run Kruskal MST, and compare mean hops with the inverse-Ackermann bound.

Union-FindDisjoint Set UnionPath CompressionUnion by RankInverse AckermannKruskal MSTData Structures

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)