Make your own free website on Tripod.com

Special Precondition: things can go wrong if the user is allowed to INSERT a value directly into a subtree (e.g. 99 into subtree rooted at 3 in earlier example).

Argument to INSERT must not be a subtree.

Delete a node from a BST: for a leaf, no problem.

To delete a node with just 1 subtree, e.g. 3 in:

        
We just link past it: