Minimum Spanning Tree
Find the minimum spanning tree of a connected undirected graph with weighted edges.
We'll cover the following...
Statement
Find the
Example
Consider the following graph:
The minimum spanning tree of the above graph is:
Sample input
Input will be a graph of the form:
v = 5
e = [ [ 1, 2, 1 ],
[ 1, 3, 1 ],
[ 2, 3, 2 ],
[ 2, 4, 3 ],
[ 3, 5, 3 ],
[ 4, 5, 2 ] ]
where is the number of edges, and is the set of weighted edges. Each edge is coded as follows: ...
Access this course and 1400+ top-rated courses and projects.