Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Data Structure
« Previous
Next »
Items in a priority queue are entered in a _____________ order
Options
- random
- order of priority
- as and when they come
- none of the above
CORRECT ANSWER : random
Discussion Board
Confuse between A and C can you plz justify
09028577702
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
CORRECT ANS
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
Ds
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 queue.one 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 answer.how it is possible?
shital 09-5-2014 04:31 AM
correct answer is
its depends priority
anup dupare 08-2-2014 07:03 AM
confuse
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
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
C test (42)
C (12)
C++ for beginners (10)
C++ (20)
C++ (24)
C++ (18)
C++ (14)
C++ (12)
C++ (15)
C++ (15)
Data structure (20)
Data structure (10)
Data structure (10)
Data structure (10)
PERL (25)
VC++ (11)
Oops (30)
Mainframe (41)
Mainframe (15)
Embedded systems (15)
OOAD (49)
Advertisement
▲