Tree Type member function Mirror Image

profilecybacatx
 (Not rated)
 (Not rated)
Chat

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?

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.

    • 10 years ago
    Tree Type member function Mirror Image
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      673324_2_sortedlisttobst.odt
    • attachment
      673324_1_bst.odt