-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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 remove method in AvlTree: Nodes can not re-balance. #33
Conversation
Remove node in AvlTree with auto balancing. Fix issue: trekhleb#13
…ithms Sync from upstream to origin
…ithms # Conflicts: # src/data-structures/tree/avl-tree/AvlTree.js
Codecov Report
@@ Coverage Diff @@
## master #33 +/- ##
==========================================
- Coverage 100% 99.68% -0.32%
==========================================
Files 86 86
Lines 1883 1906 +23
Branches 332 338 +6
==========================================
+ Hits 1883 1900 +17
- Misses 0 6 +6
Continue to review full report at Codecov.
|
Wow, @Bladefidz , thank you for your huge effort! Amount of code is impressive! I've already pushed Red-Black-Tree implementation though. The main difference between the code in master branch and this PR is that in master the Red-Black tree is based upon Binary Search tree. I think it is good approach to prevent code duplication and also because Red-Black trees are BSTs by definition. Could you please re-target this pull request so that it purpose would be balancing AVL tree while removing the node from it? |
Okay @trekhleb, I will modify my PR so only commits on AVLTree will be pulled. |
ddf1fbd
to
63e451e
Compare
@Bladefidz thank you for PR! |
Remove node in AvlTree with auto balancing. Fix issue: trekhleb#13
Remove node in AvlTree with auto balancing. Fix issue: trekhleb#13
Remove node in AvlTree with auto balancing.
Fix issue: #13