1.

Which of the following is an application of Red-black trees and why?(a) used to store strings efficiently(b) used to store integers efficiently(c) can be used in process schedulers, maps, sets(d) for efficient sortingI'd like to ask this question from Red Black Tree topic in section Binary Trees of Data Structures & Algorithms IThis question was addressed to me in an online interview.

Answer»

The correct option is (c) can be USED in process schedulers, maps, sets

Easiest explanation - RB tree is used for Linux kernel in the form of completely fair SCHEDULER process SCHEDULING algorithm. It is used for faster insertions, RETRIEVALS.



Discussion

No Comment Found

Related InterviewSolutions