Creating a binary search tree


Assignment:

Question 1. The Tree Type member function Mirror Image creates and returns a mirror image of the tree.

a. Write the declaration of the function Mirror Image. Include adequate comments.

b. Write the body of the function Mirror Image.

c. Can the binary tree returned from this function be used for binary searching? If so, how?

Question 2. Write a client function Make Tree that creates a binary search tree from the elements in a sorted list of integers. You cannot traverse the list inserting the elements in order, as that would produce a tree that has N levels. You must create a tree with at most log2N + 1 levels.

Solution Preview :

Prepared by a verified Expert
Database Management System: Creating a binary search tree
Reference No:- TGS01825087

Now Priced at $30 (50% Discount)

Recommended (95%)

Rated (4.7/5)