Mental Model
Path compression makes finding the group leader faster by making every node on the path point directly to the leader.
Analogy: Imagine a family tree where each person points to their parent. Path compression is like updating everyone in a branch to point directly to the oldest ancestor, so you can find the ancestor quickly next time.
4 -> 3 -> 1 ā start (find(4)) After path compression: 4 -> 1 3 -> 1 1 -> 1 (leader)
