1.

AVL trees provide better insertion the 2-3 trees.(a) True(b) FalseQuestion is from B-Trees in division B-Trees of Data Structures & Algorithms IThe question was posed to me in a job interview.

Answer»

Correct answer is (B) False

Easiest explanation - Insertion in AVL tree and 2-3 tree requires searching for proper POSITION for insertion and transformations for balancing the tree. In both, the trees searching takes O(log N) time, but rebalancing in AVL tree takes O(log n), while the 2-3 tree takes O(1). So, 2-3 tree provides better INSERTIONS.



Discussion

No Comment Found

Related InterviewSolutions