Implemented the disjoint set data structure and Kruskal's Algorithm