Data Structures & AlgorithmsVery hardGATE CS · ICPC regional · Product Company SDE

What is the minimum number of nodes in an AVL tree of height 2 (height of a single node = 0)?

  1. A. 4
  2. B. 3
  3. C. 6
  4. D. 2

Correct answer: A. 4

N(h) = N(h−1) + N(h−2) + 1 with N(0)=1, N(1)=2 → 1, 2, 4; N(2) = 4.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic