From 0ef76257af5eaeb305f1c1aea43b7af55f24552e Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Fri, 6 May 2022 09:47:03 +0200 Subject: [PATCH] fix(wavl): do not propagate deletion rebalance all the way Do not propage bottom-up deletion rebalance all the way to the root. Signed-off-by: Matej Focko --- wavl.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wavl.js b/wavl.js index 93f1792..0665e17 100644 --- a/wavl.js +++ b/wavl.js @@ -155,9 +155,6 @@ class WAVLTree extends AVLTree { } deleteRebalance(node, parent) { - while (node || parent) { - this.deleteFixup(node, parent); - ([node, parent] = parent), parent ? parent.parent : null; - } + this.deleteFixup(node, parent); } }