-
-
Notifications
You must be signed in to change notification settings - Fork 359
Tree Traversal in Ruby #646
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
base: main
Are you sure you want to change the base?
Tree Traversal in Ruby #646
Conversation
[lang: ruby] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took so long to get to this.
One problem I notice is that you're not executing dfs_inorder
anywhere. Also, there should be proper labels printed before each test case.
In accordance with #857 the final output should be identical to this:
[#]
Recursive DFS:
2 1 0 0 0 1 0 0 0 1 0 0 0
[#]
Recursive Postorder DFS:
0 0 0 1 0 0 0 1 0 0 0 1 2
[#]
Stack-based DFS:
2 1 0 0 0 1 0 0 0 1 0 0 0
[#]
Queue-based BFS:
2 1 1 1 0 0 0 0 0 0 0 0 0
[#]
Recursive Inorder DFS for Binary Tree:
0 1 0 2 0 1 0 3 0 1 0 2 0 1 0
Other than that, the code looks clean to me. I am not a Ruby dev, so someone else with more experience should probably take a look this.
ba63a52
to
56cfc89
Compare
Right, I just merged a PR to the master branch. Please resolve conflicts before we can consider merging. Thank you for your reactivity after this long, though 😃 |
56cfc89
to
a9320a8
Compare
Resolved the merge conflicts |
5a57016
to
25db79c
Compare
The reason these PR's take so long is that we don't have people who know the language (in this case ruby). On my end, it looks clean, so maybe I can just merge it as is? |
No description provided.