We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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!
[2, 2, 4, 2, 2]
[2, 2, 2, 2, 2]
The text was updated successfully, but these errors were encountered:
Prim and Kruskal can have different results. It all depends on the algorithm, both would be valid results.
Sorry, something went wrong.
No branches or pull requests
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!
The text was updated successfully, but these errors were encountered: