added Kruskal's algorithm and disjoint sets data structure