Skip to content

Kruskal Implemented #1352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

oldMarcosVillacanas
Copy link
Contributor

Kruskal algorithm was missing.
It is used to find the minimum spanning tree.
My code simplifies other implementations, the algorithm itself is just composed of one method with less than 25 lines of code commented.

Copy link

@luislizarraga luislizarraga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, keep it up!

@@ -0,0 +1,94 @@
package Kruskal;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repository is for educational purpose and therefore it will be great if you could add a description of your problem.

@deadshotsb
Copy link
Member

Great work, looks good but it will be better if you could add the requested addons

@oldMarcosVillacanas
Copy link
Contributor Author

Thank you for your reply, I have added a new commit giving the context missing. Could you please check it?

//The graph needs to be connected, because if there are nodes impossible to reach, there are no edges that could connect every node in the graph.
//KA is a Greedy Algorithm, because edges are analysed based on their weights, that is why a Priority Queue is used, to take first those less weighted.
//This implementations below has some changes compared to conventional ones, but they are explained all along the code.
//In case you need to know anyhing else, I would be willing to answer all your doubts, you can contact me by https://www.linkedin.com/in/marcosvillacanas/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarcosVillacanas kindly remove the reference to any personal link, you can add a reference for the algo though

@deadshotsb
Copy link
Member

@MarcosVillacanas otherwise there are no issues with the PR

@oldMarcosVillacanas
Copy link
Contributor Author

Ready to go :)

@deadshotsb deadshotsb merged commit d7a6796 into TheAlgorithms:master Jul 7, 2020
@diallocheikh007
Copy link

diallocheikh007 commented Jul 7, 2020 via email

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.

5 participants