Kruskal Algorithm: UnionFind implementation