Given n( no of nodes of the graph) and e no of edges of the graph followed by edges b/w vertexes and weight as input, calculate the minimum spanning trees cost.
Note1: it is guaranteed that the given graph is not a disjoint.
Note2: You can use any algorithm( prims and kruskal's).