Question: The source code for Binary Search Tree has been kept in blackboard. You need to add two separate functions and invoke them from main. This

The source code for Binary Search Tree has been kept in blackboard. You need to add two separate functions and invoke them from main. This is what you need to do. Add two member functions to the class BinarySearchTree 1. A void function Display that will display the binary search tree in tree shape 2. A value return or void function Search that will search for a specific data. Make sure to add two additional options, say for instance case 6 and 7 which will call one of these two functions at a time. And case 8 will exit from the code. To test the program, add at least 8 data one at a time, and then display the inorder, preorder and postorder traversal results. Then call the delete function and delete one data and display the traversal results again. Now select search option, and enter a data to be searched and see what you find. Finally call the display function to display the tree in tree shape.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!