Skip to content

Incorrect return value of Kruskal #204

Closed
@tequ1lAneio

Description

@tequ1lAneio

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions