add quick-find version of UnionFind problem