AlgoMaster Logo

Prim's Minimum Spanning Tree

n=5,edges=[[0,1,2],[0,3,6],[1,2,3],[1,3,8],[1,4,5],[2,4,7],[3,4,9]]
0 / 26
Prim's MST Algorithm263857901234Total MST Weight:0In MST:0F1F2F3F4FLegend:UnvisitedConsideringCurrentIn MSTMST Edge
algomaster.io
Step:Start: Prim's MST Algorithm. Begin from node 0.