Skip to content
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

Incorrect return value of Kruskal #204

Open
tequ1lAneio opened this issue Jul 31, 2022 · 0 comments
Open

Incorrect return value of Kruskal #204

tequ1lAneio opened this issue Jul 31, 2022 · 0 comments

Comments

@tequ1lAneio
Copy link

tequ1lAneio commented Jul 31, 2022

Hi, @loiane

I found an unexpected result of Kruskal for getting MST.
see https://github.com/loiane/javascript-datastructures-algorithms/blob/main/examples/chapter12/07-Kruskal.js#L18

When running the code above, the return value is [2, 2, 4, 2, 2] instead of the expected result [2, 2, 2, 2, 2].
Could you take a look at it? Thanks!

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

No branches or pull requests

1 participant