Computer Science EngineeringVery hardISRO SC (CS)

The keys [40, 18, 25, 51, 17, 19] are inserted in this order into an initially empty AVL tree. The height of the final tree, counted in edges (single node = 0), is:

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

Correct answer: B. 2

After balancing the tree has height 2 edges (an unbalanced BST would have 3).

More Algorithms, Data Structures & Programming (ISRO CS) questions

Exams that ask this topic