Data Structures | Balanced Binary Search Trees | Question 2

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