-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
Update avl_tree.py #2145
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
Update avl_tree.py #2145
Conversation
it's true definition of AVL tree,change left and right rotation,and add avl_tree doctest
Hey @zky001, TravisCI finished with status TravisBuddy Request Identifier: f92a6e90-b437-11ea-bd89-f57d85bb28d1 |
Travis tests have failedHey @zky001, TravisBuddy Request Identifier: 4af64640-b43d-11ea-bd89-f57d85bb28d1 |
This error is caused by flake8 W291 trailing whitespace,this whitespace is caused by my doctest's output |
when I delete this whitespace in my doctest, this action will raise test failed error. |
"\n".join(line.rstrip() for line in my_doctest()) |
>>> t = AVLtree() | ||
>>> t.insert(4) | ||
insert:4 | ||
>>> t.traversale() |
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.
Let's change the method traversale()
--> __str__()
and then change instances of t.traversale()
into str(t)
.
Also, please change |
thanks a lot |
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Hey @zky001, TravisCI finished with status TravisBuddy Request Identifier: 1fe80900-b45d-11ea-bd89-f57d85bb28d1 |
Hey @zky001, TravisCI finished with status TravisBuddy Request Identifier: 4feb7290-b45d-11ea-bd89-f57d85bb28d1 |
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Hey @zky001, TravisCI finished with status TravisBuddy Request Identifier: 6ddc2190-b45e-11ea-bd89-f57d85bb28d1 |
update some function name and update doctest
Hey @zky001, TravisCI finished with status TravisBuddy Request Identifier: 654073f0-b469-11ea-bd89-f57d85bb28d1 |
change some code format to fit flake8 review
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.
Thanks for ALL the cleanup!
* Update avl_tree.py it's true definition of AVL tree,change left and right rotation,and add avl_tree doctest * Update avl_tree.py * Update data_structures/binary_tree/avl_tree.py Co-authored-by: Christian Clauss <[email protected]> * Update data_structures/binary_tree/avl_tree.py Co-authored-by: Christian Clauss <[email protected]> * Update data_structures/binary_tree/avl_tree.py Co-authored-by: Christian Clauss <[email protected]> * Update data_structures/binary_tree/avl_tree.py Co-authored-by: Christian Clauss <[email protected]> * Update data_structures/binary_tree/avl_tree.py Co-authored-by: Christian Clauss <[email protected]> * Update data_structures/binary_tree/avl_tree.py Co-authored-by: Christian Clauss <[email protected]> * Update data_structures/binary_tree/avl_tree.py Co-authored-by: Christian Clauss <[email protected]> * Update data_structures/binary_tree/avl_tree.py Co-authored-by: Christian Clauss <[email protected]> * Update data_structures/binary_tree/avl_tree.py Co-authored-by: Christian Clauss <[email protected]> * Update data_structures/binary_tree/avl_tree.py Co-authored-by: Christian Clauss <[email protected]> * Update data_structures/binary_tree/avl_tree.py Co-authored-by: Christian Clauss <[email protected]> * Update avl_tree.py update some function name and update doctest * Update avl_tree.py change some code format to fit flake8 review Co-authored-by: Christian Clauss <[email protected]>
it's true definition of AVL tree,change left and right rotation,and add avl_tree doctest
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}
.