+1 vote
in Data Structures & Algorithms I by (110k points)
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 Answer

+1 vote
by (672k points)
selected by
Best 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.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.