Faulty binary search tree

Hide text Hide pseudo-code

Shown below is a faulty binary search tree, in which duplicate keys are added to the left brach of the existing node In the other hand, when removing a node with two children, the removed node is replaced by a node in its right subtree. Please present a sequence of insertions and deletions which generates an inconsistent search tree. (Hint: the search routine only looks for duplicates in the left subtree)

No model solution is presented, because it would make the problem trivial.

Some additional problems.



  Created Wed Jun 20 16:00:43 EEST 2007 - Powered by SVG-hut