adding UnionFind, QuickUnion and WeightedQuickUnion