Mental Model
Path compression makes finding the group leader faster by making nodes 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 root faster next time.
0 -> 1 -> 2 -> 3 -> null ā current node
