Glossary: Algorithms Beyond the Basics in C++
union by size
A union-find trick that hangs the smaller group under the bigger group's root so paths grow slowly.
Glossary: Algorithms Beyond the Basics in C++
A union-find trick that hangs the smaller group under the bigger group's root so paths grow slowly.