Skip to content

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

Merged
merged 6 commits into from
Dec 27, 2021
Merged

Conversation

ell-hol
Copy link
Contributor

@ell-hol ell-hol commented Dec 27, 2021

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.

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.
@Amaras Amaras mentioned this pull request Dec 27, 2021
@Amaras Amaras added Implementation Edit This provides an edit to an algorithm implementation. (Code and maybe md files are edited.) lang: python Python programming language labels Dec 27, 2021
More compact and pythonic
@Amaras Amaras changed the title Updated dfs_stack Updated tree traversal chapter Dec 27, 2021
Copy link
Member

@Amaras Amaras left a 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
Copy link
Member

@Amaras Amaras left a 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 :)

@Amaras
Copy link
Member

Amaras commented Dec 27, 2021

Alright, there seems to be a GH Actions problem, so we'll see when the incident is resolved, sorry for the delay.
There won't be a problem, so an admin might merge it anyway.

@Amaras Amaras merged commit fd6b7a6 into algorithm-archivists:main Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Implementation Edit This provides an edit to an algorithm implementation. (Code and maybe md files are edited.) lang: python Python programming language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants