pravocodes / Hacktoberfest2024

25 stars 227 forks source link

Add Prim's Algorithm #51

Closed avisha191 closed 1 week ago

avisha191 commented 1 week ago

Prim's Algorithm constructs a Minimum Spanning Tree by starting from a vertex and iteratively adding the smallest weight edge that connects an unvisited vertex to the growing spanning tree.