Weighted quick-union algorithm.
Hide implementation detail in WeightedQuickUnion.
WeightedQuickUnion with one pass path compression.