-
-
Notifications
You must be signed in to change notification settings - Fork 359
Updated tree traversal chapter #979
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
Conversation
Made it more pythonic and compact. Usage of temp variable wasn't necessary nor was the loop through children or the appending of the root node to the stack.
More compact and pythonic
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.
Thank you for your first PR in the AAA.
I agree this chapter needed a bit of a better implementation, which you provided.
However, since you changed the number of lines in some functions, you will need to modify the line numbers in contents/tree_traversal/tree_traversal.md
.
I'll wait for you to do that before approving.
Fixed line numbers to match new dfs_stack and bfs_queue implementation
Replaced iadd with extend in dfs_stack and bfs_queue
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.
LGTM, I'll merge when the build action runs correctly :)
Alright, there seems to be a GH Actions problem, so we'll see when the incident is resolved, sorry for the delay. |
Made it more pythonic and compact. Usage of temp variable wasn't necessary nor was the loop through children or the appending of the root node to the stack.