Kruskal's algorithm to find the minimum spanning tree of a given graph.
The input txt file to describe the graph must begin with an integer indicating the number of nodes in the graph followed by a list of integers describing each edge:
number of nodes
node1 node2 cost
node1 node2 cost
node1 node2 cost
.
.
.