Skip to content

The DFS method is incorrect. #1

Open
@AlifBrahim

Description

@AlifBrahim

The original output for the DFS if the node starts at 2 is as follows,
Depth-first search visitation order
[2, 5, 6, 4, 3, 8, 7, 1]

It should be,
[2, 1, 3, 5, 4, 6, 7, 8]

I've created a pull request for the correct method.

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