GATE Computer ScienceModerateGATE CSE · NIELIT

An AVL tree of height 6 (a single node has height 0) must contain at least how many nodes?

  1. A. 20
  2. B. 33
  3. C. 34
  4. D. 40

Correct answer: B. 33

N(h) = N(h−1) + N(h−2) + 1 with N(0)=1, N(1)=2 gives 1, 2, 4, 7, 12, 20, 33; so N(6) = 33.

More Programming and Data Structures (GATE) questions

Exams that ask this topic