WebClub-NITK / Hacktoberfest-2k19

19 stars 115 forks source link

Find the Minimum Weight Spanning Tree of an Undirected Weighted Graph #57

Closed NKH123 closed 5 years ago

NKH123 commented 5 years ago

Description

Write a program to find the minimum weight spanning tree of an undirected weighted graph using either Prim's or Kruskal's algorithm. Take input from stdin and print output to stdout. Take input as n the number of nodes, m is the number of edges. Next m lines contain u, v, and w i.e there is an edge between node u and node v with weight w. Then print the MST of the graph.

Details

Issue requirements / progress

Resources

https://en.wikipedia.org/wiki/Minimum_spanning_tree

Directory Structure

Create a folder named '57'(57 as in the issue number) in 'algorithms' folder. Name your program file as 'MST.c' or 'MST.cpp' or 'MST.py'. Add this program file to the folder '/algorithms/57'.

Note

Please claim the issue first by commenting here before starting to work on it.

For co-ordinators/maintainers creating the issues

Please mention yourself as the point of contact so that the person submitting the PR can request review from @NKH123. Doubts and clarifications are welcome.

aasthac67 commented 5 years ago

I would like to work on this

NKH123 commented 5 years ago

@aasthac67 Sure. I'll assign you the issue. You have till 24 hrs to send a PR.