Kruskal algorithm - #237
Open
nonme wants to merge 1 commit into
Open
Conversation
GnikDroy
requested changes
Oct 5, 2018
| This implementation is using DSU. O = M*log(N); | ||
| M - edges, N - nodes. | ||
| */ | ||
| //FUNCTIONS |
Contributor
There was a problem hiding this comment.
No need for this comment
We know that you are listing functions.
So you can remove //Functions.
| return graph; | ||
| } | ||
|
|
||
| void find_mst(int n, std::vector<std::pair<int, std::pair<int, int> > > graph) { |
Contributor
There was a problem hiding this comment.
return the value that you want to be printed.
Don't make this function find as well as print the values.
| dsu_unite(a, b); | ||
| } | ||
| } | ||
| print_result(weight, &mst); |
Contributor
There was a problem hiding this comment.
Take this function call and place it in main()
Author
|
@GnikDroy thanks for your reply, il'l work on it |
Member
|
are you still working on it? |
Author
|
Yep, give me some time.
пн, 8 окт. 2018 г. в 11:24, T Thiyagaraj <[email protected]>:
… are you still working on it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#237 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AoXQHR3eYQnYtMusJEhzzwLnT8_ScuVbks5uiwu6gaJpZM4XJ5S7>
.
|
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.
Description
Implementation of Kruskal algorithm with DSU in O(MlogN);
Related Issue
Please link to the issue here:
#236
How Has This Been Tested? (Optional)
Default test in main();
Types of changes
What types of changes does your code introduce? Put an
xin all the boxes that apply:Bug fix (change which fixes an issue with the algorithm)
[x ] New Algorithm (non-breaking change which adds functionality)
Documentation
Checklist:
Go over all the following points, and put an
xin all the boxes that apply.If you're unsure about any of these, don't hesitate to ask. We're here to help!
[x ] My code follows the code style of this project.
My change requires a change to the documentation.
I have updated the documentation accordingly.
[ x] I have read the CONTRIBUTING document.