Implementation of kruskal's algorithm on a provided graph ADT.