-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
Only one carriage return #2155
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
Only one carriage return #2155
Conversation
Hey @cclauss, TravisCI finished with status TravisBuddy Request Identifier: 08ef56d0-b6cf-11ea-bb0d-6965ce86ea0c |
Hey @cclauss, TravisCI finished with status TravisBuddy Request Identifier: 1e401370-b6d0-11ea-bb0d-6965ce86ea0c |
Hey @cclauss, TravisCI finished with status TravisBuddy Request Identifier: aac1c5a0-b6d0-11ea-bb0d-6965ce86ea0c |
Hey @cclauss, TravisCI finished with status TravisBuddy Request Identifier: 8f7490f0-b6d2-11ea-bb0d-6965ce86ea0c |
13846d5
to
a97691b
Compare
2cd95a2
to
4978f84
Compare
get_height(root.get_right().get_left()): | ||
if get_height(root.get_right().get_right()) > get_height( | ||
root.get_right().get_left() | ||
): | ||
root = left_rotation(root) |
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.
right_height = get_height(root.get_right().get_right())
right_left_height = get_height(root.get_right().get_left())
if(right_height > right_left_height):
root = left_rotation(root)
Now it's unreadable 😢
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.
The first variable would be right_right_height
which is no more readable than get_height(root.get_right().get_right())
.
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.
@cclauss Could we refactor this in this pr? If not i will approve it without and open new with refactor.
get_height(root.get_left().get_right()): | ||
if get_height(root.get_left().get_left()) > get_height( | ||
root.get_left().get_right() | ||
): |
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.
left_height = get_height(root.get_left().get_left())
left_right_height = get_height(root.get_left().get_right())
if(left_height > left_right_height):
root = right_rotation(root)
Travis tests have failedHey @cclauss, TravisBuddy Request Identifier: 3d4bc800-b6d4-11ea-bb0d-6965ce86ea0c |
Travis tests have failedHey @cclauss, TravisBuddy Request Identifier: ce3dfe40-b6d5-11ea-bb0d-6965ce86ea0c |
@mateuszz0000 Your review please |
* updating DIRECTORY.md * touch * fixup! Format Python code with psf/black push * Update word_frequency_functions.py * updating DIRECTORY.md * Update word_frequency_functions.py * Update lfu_cache.py * Update sol1.py Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}
.