Yogeshk4124 / HacktoberFest-Data-Structure-and-algorithm

MIT License
4 stars 32 forks source link

Create Prim’s Minimum Spanning Tree #39

Closed ishaanjain1898 closed 4 years ago

ishaanjain1898 commented 4 years ago

How does Prim’s Algorithm Work? The idea behind Prim’s algorithm is simple, a spanning tree means all vertices must be connected. So the two disjoint subsets (discussed above) of vertices must be connected to make a Spanning Tree. And they must be connected with the minimum weight edge to make it a Minimum Spanning Tree.