Glossary: Algorithms Beyond the Basics in C++
Path compression
A union-find trick where `find` points every item it passed straight at the root, so the next walk takes one step.
Glossary: Algorithms Beyond the Basics in C++
A union-find trick where `find` points every item it passed straight at the root, so the next walk takes one step.