Priority Queue

What is Priority Queue? Explain with example.

Questions by shiv sinha

Showing Answers 1 - 11 of 11 Answers

murali_417

  • Dec 14th, 2008
 

A priority queue is essentially a list of items in which each item has associated with it a priority. In general, different items may have different priorities and we speak of one item having a higher priority than another. Given such a list we can determine which is the highest (or the lowest) priority item in the list. Items are inserted into a priority queue in any, arbitrary order.

  Was this answer useful?  Yes

ravi6771

  • Aug 12th, 2009
 

Heap is also called a priority queue. Heaps are of two types one is min heap and other is max heap. Min heap contains min at the top of tree.

  Was this answer useful?  Yes

Heap is also called a priority queue. Heaps are of two types one is min heap and other is max heap. Min heap contains min at the top of tree.

  Was this answer useful?  Yes

Hello!

priority queue is a data structure which exhibits two properties
1.structure property
2.order property

Structure property means that the queue will be a complete binary tree

Order property means that tree elements will be in some proper order i.e  each parent node will be smaller or greater than both of its child.

these both properties can be easily maintained in an Array,so this binary tree is represented in an array.
  

  Was this answer useful?  Yes

Suresh-Blore

  • Jul 25th, 2011
 

Waiting queue may not operate on strictly first in first out basis,,but on some complex priority scheme based on such factors as what compiler is being used,the execution time required,number of print lines etc.The resulting queue is called Priority queue.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions