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