Question: Implement a binary search tree class of Strings with the following methods in c++: search( ..) a boolean search method. insert(..), insert a String to
Implement a binary search tree class of Strings with the following methods in c++:
search( ..) a boolean search method.
insert(..), insert a String to the binary search tree (if it does not already exist).
delete( .. ), delete a String may use deletion by merging or deletion by copying.
height( ), return the height of the tree.
inorder( ), prints the inorder traversal of the tree.
preorder( ), prints the preorder traversal of the tree.
postorder( ), prints the postorder traversal of the tree.
deleteWholeTree( ), Deletes the whole tree and returns its allocated memory, to avoid memory leak.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
