Path compression [mp]
Micro pattern¶
Description¶
Make visited nodes point directly to their component representative during lookup.
Problems¶
- 990. Satisfiability of Equality Equations (Graph Theory)
- 1061. Lexicographically Smallest Equivalent String (Graph Theory)
- 839. Similar String Groups (Graph Theory)