The operation
replace(in replacementItem:TreeItemType):boolean
locates, if possible, the item in a binary search tree with the same search key as replacementltem. If the tree contains such an item, replace replaces it with replacementltem. Thus, the fields of'the original item are updated.
a. Add the operation replace to the reference-based implementation of the ADT binary search tree given in this chapter. The operation should replace an item without altering the tree structure.
b. Instead of adding replace as an operation of the ADT binary search tree, implement it as a client of BinarySearchTree. Will the shape of the binary tree remain the same?
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.