Which of the following trees are height balanced? A. Binary Search Tree B. AVL…

2025

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:

  1. A.

    A and D Only

  2. B.

    A, B and D Only

  3. C.

    C and D Only

  4. D.

    B and C Only

Attempted by 593 students.

Show answer & explanation

Correct answer: D

Answer: AVL Tree and Red-Black Tree are height balanced.

  • AVL Tree — strictly height-balanced: for every node, the heights of the left and right subtrees differ by at most 1. This guarantees the tree height is O(log n) and ensures logarithmic-time operations.

  • Red-Black Tree — height-balanced in a relaxed sense: color and black-height properties ensure the tree height is bounded by O(log n) (specifically height ≤ 2·log2(n+1)), so it provides logarithmic-time operations as well.

  • Binary Search Tree — not necessarily height-balanced: without rebalancing, it can become skewed (e.g., inserting sorted keys) and have height O(n), causing degraded performance.

  • B-Tree — balanced in the multi-way-tree sense: all leaves are at the same depth, which is important for external storage. However, the phrase "height-balanced" in this question refers to binary-tree left/right subtree height constraints, so B-Tree is not counted among the binary height-balanced trees asked for here.

Therefore the correct choice is the one that selects AVL Tree and Red-Black Tree.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Coding For Placement