AVL trees provide better insertion the 2-3 trees.

Category: QuestionsAVL trees provide better insertion the 2-3 trees.
Editor">Editor Staff asked 4 weeks ago

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

1 Answers
Editor">Editor Staff answered 4 weeks ago

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.