-
-
Notifications
You must be signed in to change notification settings - Fork 46.4k
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
add binary_tree_traversals.py to data_structures #3297
add binary_tree_traversals.py to data_structures #3297
Conversation
I have added some interesting binary tree traversing methods.
Can anyone help me out with what's the problem with my PR? |
Run your code thru psf/black as discussed in CONTRIBUTING.md |
Co-authored-by: Christian Clauss <cclauss@me.com>
Any suggestions? |
This will save you a ton of manual formatting...
|
ok i'll try |
? |
data_structures/binary_tree/binary_tree_traversals.py:24:89: E501 line too long (89 > 88 characters) |
can you explain? |
Lines are not allowed to be longer than 88 characters max. Lines 24 and 34 are too long and must be wrapped. |
Co-authored-by: Christian Clauss <cclauss@me.com>
Travis tests have failedHey @rajansh87, TravisBuddy Request Identifier: 6838e980-0e68-11eb-964d-5d54b4986782 |
Travis tests have failedHey @rajansh87, TravisBuddy Request Identifier: ade5d380-0e68-11eb-964d-5d54b4986782 |
I think we should not make further changes as it might becomeworse... |
Please do not give up... We are really close. Our testing now accepts trailing spaces inside triple quotes so your doctests should now work if your answers have one trailing space. |
ok |
what to do next? |
why is this failing to build, can we see whats are the logs or what is error? |
I hope this will be 100% green with doctests and type hints so we can land this PR. Now I remember why I said that algorithmic functions should not print()... It makes testing too hard. |
Yeah, Now i understood. |
Travis tests have failedHey @rajansh87, TravisBuddy Request Identifier: 76c03820-0ecf-11eb-9bff-abeacd856cb9 |
? |
I think our entire repository is based on the code style of |
I will revert the black change in a separate PR. |
Black is actually not changing the file in the current state. $ black --check binary_tree_traversals.py
All done! ✨ 🍰 ✨
1 file would be left unchanged. |
Yes, See #3318 |
thanks, guys it was really very interesting and helpful of you because this was my first time when I was contributing to such a huge repo. Learned a lot of kinds of stuff which I had not any idea. Thanks, @cclauss, and @dhruvmanila for helping me troughout. |
This was work well done. Please come back with another algoritym soon. There are still doctests missing from many of those functions if you can figure out how to add them. |
yeah, i was looking at that only. Any suggestions! |
Perhaps Using |
* add binary_tree_traversals.py to data_structures I have added some interesting binary tree traversing methods. * Fixed error * Update data_structures/binary_tree/binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update data_structures/binary_tree/binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update data_structures/binary_tree/binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update data_structures/binary_tree/binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update data_structures/binary_tree/binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update binary_tree_traversals.py * Update data_structures/binary_tree/binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update binary_tree_traversals.py * Doctests and type hints * Add spaces * Update binary_tree_traversals.py * black exclude data_structures/binary_tree/binary_tree_traversals.py * Add spaces again * Update binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com>
* add binary_tree_traversals.py to data_structures I have added some interesting binary tree traversing methods. * Fixed error * Update data_structures/binary_tree/binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update data_structures/binary_tree/binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update data_structures/binary_tree/binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update binary_tree_traversals.py * Update binary_tree_traversals.py * Update data_structures/binary_tree/binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update data_structures/binary_tree/binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update binary_tree_traversals.py * Update data_structures/binary_tree/binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update binary_tree_traversals.py * Doctests and type hints * Add spaces * Update binary_tree_traversals.py * black exclude data_structures/binary_tree/binary_tree_traversals.py * Add spaces again * Update binary_tree_traversals.py Co-authored-by: Christian Clauss <cclauss@me.com>
I have added some interesting binary tree traversing methods.
Describe your change:
In data_structures/binary_tree repository I have added a new file that includes some interesting methods for traversing a binary tree.
Checklist:
Fixes: #{$ISSUE_NO}
.