Skip to content

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