Skip to content

Conversation

@Himanshu-77
Copy link
Contributor

code implemented for Prim's Algorithm to find minimum spanning tree. Although there was file named minimum_spanning_tree.py in graph section but contain only Kruskal Algorithm . Prim's Algo. was still missing

code implemented for Prim's Algorithm to find minimum spanning tree. Although there was file named minimum_spanning_tree.py in graph section but contain only Kruskal Algorithm . Prim's Algo. was still missing
@ericklarac
Copy link
Collaborator

@Himanshu-77 add the test cases and put your code into a function

Review this PR as a guide https://github.com/keon/algorithms/pull/631/files

function and sample test cases added
@Himanshu-77
Copy link
Contributor Author

@ericklarac Thanks for your suggestions. Function created and sample test cases provided

@ericklarac
Copy link
Collaborator

@Himanshu-77 By test cases I was referring to unit tests. The unit tests have to be added into the test folder. Can you please review it and make the proper changes?.

unittest added for prims_minimum_spanning.py
function name changed
@Himanshu-77
Copy link
Contributor Author

@ericklarac Thanks for your suggestions. I have added unit tests in test folder properly.

@ericklarac
Copy link
Collaborator

@Himanshu-77 Could you add the link to the file on the README.md?

On graph sect add:

- [minimum_spanning_tree_prims](algorithms/graph/prims_minimum_spanning.py)

link added for new file prims_minimum_spanning.py
@Himanshu-77
Copy link
Contributor Author

@ericklarac Everything is done. Thanks again for your suggestions and guidance.

@ericklarac
Copy link
Collaborator

@Himanshu-77 You are welcome, and excellent first contribution! Feel free to add more algorithms.

@ericklarac ericklarac closed this May 14, 2020
@ericklarac ericklarac reopened this May 14, 2020
@ericklarac ericklarac merged commit e498d4e into keon:master May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants