tip about method BinarySearchTree.replaceNodeWithNode()
zzuklj opened this issue · 0 comments
zzuklj commented
this code is not wrong. I wonder can you modify it.
in my opinion, replacementNode must be a leaf node.
so if it is a left leaf node or a right leaf node,
just make sure replacementParent.lesser = null; or replacementParent.greater= null;