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 5 months 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 5 months 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.


Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40702