Glossary: Algorithms Beyond the Basics in Java
union by size
A union-find trick that hangs the smaller group's root under the bigger group's root, so paths stay short.
Glossary: Algorithms Beyond the Basics in Java
A union-find trick that hangs the smaller group's root under the bigger group's root, so paths stay short.