PRIORITY QUEUE


 Unlike the general queues which are FIFO structures , the order of deletion from a priority queue is determined by the element priority. Elements are deleted either in increasing or decreasing order of priority from a priority queue.

A Priority queue is a collection of zero or more elements. Each element has a priority or a value.The operations performed on a priority queue are
1)Find an element
2)Insert a new element
3)Delete an element

In “Min Priority Queue” the find operation finds the element with minimum priority , while the delete operation deletes it.
In “Max Priority Queue” the find operation finds the element with maximum priority , while the delete operation deletes it.

A priority queue  can be implemented by using
1)Heap
2)Height and Weight balanced leftist trees.

One thought on “PRIORITY QUEUE”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s