Weighted Quick Union is a data structure implementing Dynamic Connectivity, and a variant of Quick Union.
It improves the base structure by keeping track of the size of each tree to help avoid creating tall trees by balancing them more effectively.
Weighted Quick Union is a data structure implementing Dynamic Connectivity, and a variant of Quick Union.
It improves the base structure by keeping track of the size of each tree to help avoid creating tall trees by balancing them more effectively.