Mental Model
Path compression makes finding the group leader faster by flattening the structure during searches.
Analogy: Imagine a family tree where each person points to their parent. Path compression is like updating everyone on the path to point directly to the oldest ancestor, so future lookups are quicker.
1 -> 2 -> 3 -> 4 -> null βroot points to 1 Initially, each node points to its parent forming a chain.
