Prim’s Algorithm
The purpose of this algorithm is to find the Minimum Spanning Tree (MST) of a connected, undirected, weighted graph.
Start from any node and grow tree outwards, always pick the cheapest edge from already built-tree.
Here, we take 5 as node.
MST: 17
Taking 3 as node.
