Implemented kruskal algorithm - #24
Merged
Merged
Conversation
added 3 commits
August 14, 2017 13:29
…ure to decrease time complexity. Write doc and adapt setup.py to pep8 style guide
Owner
|
The algorithm looks implemented very well. Just a thought, Kruskal's Algorithm is an algorithm of Graph data structures. So, would it be better to place it under |
added 4 commits
August 16, 2017 02:09
Moved implentation of kruskal into WeightedGraph class into data_structures/graph.py and refactor relative tests. Changed some implementation details into Graph class to simplify the code into add_edge method
…ctures/graph.py and refactor relative tests. Changed some implementation details into Graph class to simplify the code into add_edge method. Changed some code in linked_list and modules to respect pep8 and make some methods (especially get_code()) static or class dependent
Author
|
you have reason, i've moved the implementation into a new WeightedGraph class into graph.py file. I've changed also a little thing into your Graph class: changed the graph variable from dict to defaultdict so the code in add_edge method it's very simplified. I've do some small changes to fit the pep8 style guide into linked_list.py and modules.py. Tell me if you want else i can remove it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've implemented the kruskal algorithm to find the minimum spanning tree in a weighted connected undirected graph. I've wrote two tests for kruskal algorithm and all seems work and i run also your tests after the implementation to check that all works.
I'm not an expert of documentation with python, so please check carefully my docs.