Question: Class definition of the binary search trees implementation has a private member function called Make_Empty (not the public one, which only calls the private one).

Class definition of the binary search trees implementation has a private member function called Make_Empty (not the public one, which only calls the private one). This function deletes the entire tree from the memory. It has been written using postorder traversal. Change the definition of private Make_Empty function such that it performs the same functionality, but by using preorder traversal instead. inline void tree::Make_Empty ( Node *T ) { if (T != NULL) { Make_Empty ( T->Left ); Make_Empty ( T->Right ); delete T;}} inline void tree::Make_Empty ( ) { Make_Empty ( Root ); Root = Last_Find = NULL;} 

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!