pravocodes / Hacktoberfest2024

26 stars 249 forks source link

Add Prim's Algorithm #51

Closed avisha191 closed 1 month ago

avisha191 commented 1 month 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.