-
Notifications
You must be signed in to change notification settings - Fork 8
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
The DFS method is incorrect. #1
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: