Implemented KruskalMinimumSpanningTree.