Skip to content
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

fix: Chapter 10 AVL tree insertNode and removeNode functions #193

Merged
merged 1 commit into from
May 17, 2022

Conversation

Jeffzholy
Copy link

CHANGES:

  1. remove if condition this.compareFn(key, node.key) === Compare.BIGGER_THAN in insertNode function
  2. align all if condition code blocks with assignment statement node = xxx instead of half return statement and half assignment statement
  3. align rotation/balance logic in removeNode function with insertNode function, because they share the same rotation logic
  4. copy the same code to the TS file

@Jeffzholy Jeffzholy changed the title fix: AVL tree insertNode and removeNode functions fix: Chapter 10 AVL tree insertNode and removeNode functions May 17, 2022
@loiane loiane merged commit 73b3db5 into loiane:main May 17, 2022
@Jeffzholy Jeffzholy mentioned this pull request May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants