Added the graph construction to Kruskal B MST