Tree Removal: Special Cases
Removing a node with 2 children
Since we know that the node to be deleted has
two children, it is now clear that the inorder
successor is the leftmost node of the "deleted
nodes" right subtree.
Once it is found, you copy the value of the
item into the node you wanted to delete and
remove the node found to replace this one --
since it will never have two children.