Binary Search Tree

1. If a binary search tree has height hh, where height is measured as the number of edges on the longest root-to-leaf path, what is the maximum number of nodes it can have?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

2. A binary search tree has 16 nodes. What is the maximum possible height of the tree, assuming height is measured as the number of edges on the longest root-to-leaf path?

Explanation

Explanation

Explanation

Explanation

Explanation

3. In a binary search tree implemented using linked nodes, how many child pointers does each node typically have to maintain its left and right subtrees?

Explanation

Explanation

Explanation

Explanation

4. Which of the following can be the data type of the variable aa if the statement `next = a->lchild;` compiles correctly?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

5. Which traversal of a binary search tree visits the keys in nondecreasing sorted order?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

6. Which property distinguishes a binary search tree from a general binary tree?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

7. If the keys 50, 30, 70, 20, and 40 are inserted into an initially empty binary search tree in that order, which key becomes the left child of 30?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

8. A binary search tree contains the keys 20, 10, 30, 5, 15, 25, and 35. Which key is encountered first when searching for 25?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

9. Two binary search trees contain the same set of distinct keys but were built using different insertion orders. Which statement is necessarily true?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation