fix: improve deletion
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
43ade1120b
commit
991388604f
1 changed files with 3 additions and 2 deletions
|
@ -139,13 +139,14 @@ class RankedTree {
|
|||
successor.value = null;
|
||||
this.record(
|
||||
"Replacing the value of deleted node with successor value",
|
||||
node
|
||||
node,
|
||||
successor
|
||||
);
|
||||
|
||||
return this.deleteNode(successor);
|
||||
}
|
||||
|
||||
this.record("Replacing the node with one of its children", node);
|
||||
this.record("Replacing the node with one of its children", node, y);
|
||||
|
||||
return [y, parent];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue