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. |