Added UnionFind class
Added weighted Union-Find algorithm