Implemented Kruskal MST