+1 vote
in Data Structures & Algorithms I by (110k points)
Which of the following is not an advantage of a priority queue?

(a) Easy to implement

(b) Processes with different priority can be efficiently handled

(c) Applications with differing requirements

(d) Easy to delete elements in any case

This is a very interesting question from Priority Queue topic in chapter Abstract Data Types of Data Structures & Algorithms I

I got this question in examination.

1 Answer

+1 vote
by (412k points)
selected by
Best answer
The correct answer is (d) Easy to delete elements in any case

For explanation: In worst case, the entire queue has to be searched for the element having the highest priority. This will take more time than usual. So deletion of elements is not an advantage.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.