Minimum Spanning Tree

2

1 votes
Easy
Problem

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).

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?