-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
feat: kruskal's algorithm using DSU #374
Conversation
This pull request introduces 2 alerts when merging eb3a8ac into e14ac15 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some links for reference.
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good implementation. I recommend trying to use Go's powerful syntax capabilities instead of just refactoring c++ style code to go. Think of algorithms that are as easy to understand as possible when reading.
@tjgurwara99 I think all the requested changes are complete. Please take a look. Thanks for the tips you gave along the way! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than those everything else looks good. The reason I'm asking for these changes is because I'm trying to get this repository to work nicely with go playground. For example, take a look at this one. This is using the alpha version of this repo released(?) a few months back and can easily be used to work with it to try and test out this repo functions and implementations without cloning it locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Maybe an improvement could be made by making use of dynamic size of slices but... that is for another PR. This one can be merged now.
@viveknathani you might need to do a git pull on your local - I mistakenly synchronised your branch with our master branch. @siriak could you also take a look at this PR to see if it needs any changes, if not it can be merged 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Hi guys! I saw that Kruskal's algorithm was missing from the list. So I wrote an implementation using the disjoint set union data structure. Also, it would be amazing if you could add the
hacktoberfest-accepted
label to it.References: