Items in a priority queue are entered in a _____________ order

- random
- order of priority
- as and when they come
- none of the above


Discussion Board
Confuse between A and C can you plz justify


Prashant mane 07-3-2017 07:34 AM

Data Structure - Priority Queue

Items in a priority queue are entered in a random order. Priority queue contains data items which have some preset priority. While removing an element from a priority queue, the data item with the highest priority is removed first.
In a priority queue, insertion is performed in the order of arrival and deletion is performed based on the priority.

Prajakta Pandit 01-31-2017 06:43 AM


n a priority queue, an element with high priority is served before an element with low priority.

RACHNA 12-29-2016 04:33 AM

random is a sub type of "as and when they come"

"as and when they come" is correct. It does not exclude "random" but allows for a specific order if the program gives one.

steven 05-20-2016 06:48 PM

Data structure & Algorithm

no in priority queue elements are entered randomly. the order of priority is maintained when they are processed. and here processing means deletion from the queue. so the element with the highest priority is deleted at the begining. if more than 1 element have the same priority then fifo i.e first in first out order is followed!! suppose D with max priority 4 is deleted at first. then element with priority 3 is to be deleted. now suppose A and B both have priority 3. that case the element which has entered in the queue before will be processed and deleted, then the next one. after elements with priority 3 deletd, then elements with priority 2 is to be processed!! (CONSIDERING PRIORITY ORDER 1<2<3<4)

Abhishek 10-4-2015 05:13 PM


The data should be inserted as they come but priority order should be maintained

Manoj kumar 06-17-2015 02:48 AM

data structure

the answer "random" is wrong. How would you define random. @chandini is half way correct. The correct answer should be c "as when they come" which implies random.

mohan sharma 10-27-2014 02:28 AM

Data structure

priiroty queue is implemented using two to hold data and another to hold priority.Hence data in data queue can be in random order.

chandni 09-28-2014 12:20 AM

data structure

give me the proper explanation of the it is possible?

shital 09-5-2014 04:31 AM

correct answer is

its depends priority

anup dupare 08-2-2014 07:03 AM


As per my view in priority queue the elements are entered in the basis of order of priority...if two items have the same priority it looks for the queue order..

kannan 07-26-2014 12:41 AM

confusion in given answer

as per my view , item in a priority queue are entered in a order of priority order.

Pooja 07-14-2014 11:33 PM

Write your comments


Enter the code shown above:
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)