Union-Find (Disjoint Set Union)

Path Compression & Union by Rank — Step by Step

Click "Next Step" to begin the Union-Find demonstration

🌳 Parent Pointer Forest

šŸ“‹ Arrays

Vertex parent[] rank[]

šŸ“ Operation Log

Root node
Regular node
Path being followed
Compressed by Find
Parent pointer