Constructed weighted undirected graphs and implemented Kruskal’s algorithm to find its minimum spanning tree