When to choose Red-Black tree, AVL tree and B-trees?

Category: QuestionsWhen to choose Red-Black tree, AVL tree and B-trees?
Editor">Editor Staff asked 4 weeks ago

When to choose Red-Black tree, AVL tree and B-trees?
 
(a) many inserts, many searches and when managing more items respectively
 
(b) many searches, when managing more items respectively and many inserts respectively
 
(c) sorting, sorting and retrieval respectively
 
(d) retrieval, sorting and retrieval respectively
 
Query is from Red Black Tree topic in division Binary Trees of Data Structures & Algorithms I
 
This question was addressed to me during a job interview.

1 Answers
Editor">Editor Staff answered 4 weeks ago

The correct option is (a) many inserts, many searches and when managing more items respectively
 
Easiest explanation – Red black when frequent inserts and deletes, AVL when less frequent inserts and deletes, B-tree when using paging from a slow storage device.