A self – balancing binary search tree can be used to implement ________

Category: QuestionsA self – balancing binary search tree can be used to implement ________
Editor">Editor Staff asked 1 month ago

A self – balancing binary search tree can be used to implement ________
 
(a) Priority queue
 
(b) Hash table
 
(c) Heap sort
 
(d) Priority queue and Heap sort
 
The above asked question is from Binary Trees in section Binary Trees of Data Structures & Algorithms I
 
I have been asked this question in an interview for job.

1 Answers
Editor">Editor Staff answered 1 month ago

Right choice is (a) Priority queue
 
Explanation: Self-balancing binary search trees can be used to construct and maintain ordered lists, to achieve the optimal worst case performance. So, self – balancing binary search tree can be used to implement a priority queue, which is ordered list.