Skip to content

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.

Where the book teaches it

Related terms

union by sizeunion-find