1.

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 respectivelyQuery is from Red Black Tree topic in division Binary Trees of Data Structures & Algorithms IThis question was addressed to me during a job interview.

Answer»

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.



Discussion

No Comment Found

Related InterviewSolutions