Question: Examine the following binary search tree and answer the question. The numbers on the nodes are values in the key members of the items in
Examine the following binary search tree and answer the question. The numbers on the nodes are values in the key members of the items in the tree. (1) What is the height of the tree? (2) What nodes are on level 2? (3) Which levels have the maximum number of nodes that they could contain? (4) What is the minimum height of a binary search tree containing these nodes? (5) What is the maximum height of a binary search tree containing these nodes? (6) Trace the path that would be followed in searching for a node containing 61. (7) Show the order in which the nodes in the tree are processed by a preorder traversal of the tree. 9. Implement the following TreeType member function Ancestors that prints the ancestors of a given node whose info member contains value. template
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
