Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add AVL tree rotation example image; #319

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

Conversation

@Antondomashnev
Copy link
Contributor

@Antondomashnev Antondomashnev commented Dec 17, 2016

I've tried to follow the style of existing images in the AVL tree readme, however it's not 100% the same 😄

Copy link
Member

I think it'll be good to explain the steps in the rotation. For example, how you might find the pivot, how you want to disconnect and reconnect the nodes.

Otherwise, the graph is a solid addition 👍

Copy link
Contributor Author

@kelvinlauKL Thanks for the response, I'm completely agree, I'll update the PR with the steps description 👍

kelvinlauKL reacted with thumbs up emoji

Copy link
Contributor Author

@kelvinlauKL I've added some explanation, could you take a look if this made the image clear or not 😄

Copy link
Member

@kelvinlauKL kelvinlauKL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I think there are some improvements to make:

  1. Split up the diagrams, the first one should show where pivot, root, rotationalSubtree and oppositeSubtree are.

  2. Put the terminology explanation right after the first diagram.

  3. Next, show the 3 steps in rotation the tree, number each diagram.

  4. Explain the steps in the rotation using a numbered list to help the reader match each explanation with each diagram.

Great job so far 👍 It's starting to come together.

![Rotation](Images/Rotation.jpg)

Let's dig into rotation algorithm in detail using the terminology:
* *Root* - the parent not of the subtrees that will be rotated;
Copy link
Member

@kelvinlauKL kelvinlauKL Dec 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo here - "parent not" should be "parent node"

Antondomashnev reacted with thumbs up emoji
Copy link
Contributor Author

@kelvinlauKL thanks for the valuable feedback, I'll work on improvements 👍

Copy link
Contributor Author

@kelvinlauKL please ignore the commits for now, we can squash them later 😄

Copy link
Member

Okie dokie, let me know when it's ready.

Copy link
Contributor Author

Okie dokie, let me know when it's ready.

Ah sorry, I meant ignore the commit message and that the message is repeating 😄 but you can take a look on the implementation already 😉

Copy link
Member

Looks great 👍 👍 👍 Merging it in. Thanks @Antondomashnev, and Merry Christmas!!

@kelvinlauKL kelvinlauKL merged commit e61e743 into kodecocodes:master Dec 22, 2016
@Antondomashnev Antondomashnev deleted the antondomashnev/avl-tree/rotation branch December 22, 2016 15:59
Copy link
Contributor Author

@kelvinlauKL merry Christmas ⛄️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kelvinlauKL kelvinlauKL kelvinlauKL approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /