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