add QuickUnion and WeightedQuickUnion