All mock tests are FREE till 31 December — register to save your progress

Which of the following trees are height balanced?
A. Binary Search Tree
B. AVL Tree
C. Red-Black Tree
D. B Tree
Choose the correct answer from the options given below:

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. B, C and D Only

Explanation

A plain BST can become skewed (height n). AVL trees keep the balance factor within ±1, red-black trees keep height ≤ 2 log(n+1), and B-trees keep all leaves at the same level. So B, C and D are height balanced.

More Data Structures and Algorithms questions