What is the maximum height of any AVL-tree with 7 nodes? Assume that the height of a tree with a single node is 0.

**(A)** 2

**(B)** 3

**(C)** 4

**(D)** 5

**Answer:** **(B)** **Explanation:** AVL trees are binary trees with the following restrictions.

1) the height difference of the children is at most 1.

2) both children are AVL trees

Following is the most unbalanced AVL tree that we can get with 7 nodes

a / \ / \ b c / \ / / \ / d e g / / h

## Recommended Posts:

- Data Structures | Balanced Binary Search Trees | Question 2
- Data Structures | Balanced Binary Search Trees | Question 10
- Data Structures | Balanced Binary Search Trees | Question 4
- Data Structures | Balanced Binary Search Trees | Question 5
- Data Structures | Balanced Binary Search Trees | Question 13
- Data Structures | Balanced Binary Search Trees | Question 7
- Data Structures | Balanced Binary Search Trees | Question 13
- Data Structures | Balanced Binary Search Trees | Question 9
- Data Structures | Balanced Binary Search Trees | Question 13
- Data Structures | Balanced Binary Search Trees | Question 11
- Data Structures | Balanced Binary Search Trees | Question 12
- Data Structures | Balanced Binary Search Trees | Question 13
- Data Structures | Binary Search Trees | Question 1
- Data Structures | Binary Search Trees | Question 2
- Data Structures | Binary Search Trees | Question 3
- Data Structures | Binary Search Trees | Question 4
- Data Structures | Binary Search Trees | Question 5
- Data Structures | Binary Search Trees | Question 6
- Data Structures | Binary Search Trees | Question 7
- Data Structures | Binary Search Trees | Question 8