Professional KnowledgeHardIBPS SO IT

Inserting 10, 20, 30, 40, 50, 25 in an AVL tree, the root of the final tree is:

  1. A. 30
  2. B. 20
  3. C. 40
  4. D. 25

Correct answer: A. 30

After 40, 50 the tree is 20(10, 40(30, 50)); inserting 25 unbalances the root in a right-left case, and a double rotation makes 30 the root.

More IT Officer Professional Knowledge (IBPS SO) questions

Exams that ask this topic