answersLogoWhite

0


Best Answer

the priority queue is which depends on the data stored.in which their priority is maintained by checking the forth coming values stored in the queue

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Array implementation of priority queue
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Array implementation of priority queue example program in c plus plus?

yes


Is cursor implementation possible in queue or stack?

yes,cursor implementation possible in priority queue.


What are the advantages of a list over an array for implementing a priority queue?

A priority queue not only requires insertion of a new element at the end of the queue, but may require insertion at the head or somewhere in the middle, subject to the priority of the new item. This can be implemented efficiently using a list, but would generally require more expensive operations when implemented using an array, such as moving existing elements of lower priorities "one down" to make room for the new element. Having said that, many other implementations of priority queues are possible, which might be perfectly suited for implementation with an array. For example, if the number of different priority levels is finite and small (three levels for low, middle and high, for example), one might consider implementing three queues instead, one for each priority level. This would allow for efficient implementation with statically allocated and sized arrays, which is often the preferred approach in embedded programming.


Queue ADT Using Array?

implement the queue ADT using an array


What are the different types of queues?

A priority queue is a queue in which each element is inserted or deleted on the basis of their priority. A higher priority element is added first before any lower priority element. If in case priority of two element is same then they are added to the queue on FCFS basis (first come first serve). Mainly there are two kinds of priority queue: 1) Static priority queue 2) Dynamic priority queue

Related questions

Array implementation of priority queue example program in c plus plus?

yes


Is cursor implementation possible in queue or stack?

yes,cursor implementation possible in priority queue.


What are the advantages of a list over an array for implementing a priority queue?

A priority queue not only requires insertion of a new element at the end of the queue, but may require insertion at the head or somewhere in the middle, subject to the priority of the new item. This can be implemented efficiently using a list, but would generally require more expensive operations when implemented using an array, such as moving existing elements of lower priorities "one down" to make room for the new element. Having said that, many other implementations of priority queues are possible, which might be perfectly suited for implementation with an array. For example, if the number of different priority levels is finite and small (three levels for low, middle and high, for example), one might consider implementing three queues instead, one for each priority level. This would allow for efficient implementation with statically allocated and sized arrays, which is often the preferred approach in embedded programming.


What is the difference between a priority queue and a circular queue?

A circular queue is similar to the normal queue with the difference that queue is circular queue ; that is pointer rear can point to beginning of the queue when it reaches at the end of the queue. A priority queue is a queue in which each element is inserted or deleted on the basis of their priority. A higher priority element is added first before any lower priority element. If in case priority of two element is same then they are added to the queue on FCFS basis (first come first serve).


What are the difference between ascending priority queue and descending queue?

Ascending priority queue is a collection of items which can be inserted aurbitarly and which can be removed smallest item. Descending priority queue is similar to ascending priority queue but it allows the deletion of the largest item.


Queue ADT Using Array?

implement the queue ADT using an array


Which queue most efficient queue using array?

circular queue


What are the different types of queues?

A priority queue is a queue in which each element is inserted or deleted on the basis of their priority. A higher priority element is added first before any lower priority element. If in case priority of two element is same then they are added to the queue on FCFS basis (first come first serve). Mainly there are two kinds of priority queue: 1) Static priority queue 2) Dynamic priority queue


What are advantages and disadvantages of priority?

The advantage of a priority queue is that nodes can be weighted, allowing those with greater precedence to be moved towards the head of the queue, in front of those with lesser priority, rather than always being added to the tail of the queue as would happen in a normal queue. The disadvantage is that insertions are no longer performed in constant time as new nodes must use insertion sort to find their place in the queue (behind nodes with greater or equal priority). However, if the variable weights are finite, maintaining pointers for each weight in a static array will provide constant time insertions.


Minimum number of queues needed to implement the priority queue?

Separated queue for every possible priority value.


Circular queue program?

For the Complete Implementation of Circular Queue Check out www.codeuniverse.tk


How many minimum no of queues Rae needed to implement priority queue?

Two possible solutions: 1. Separated queue for every possible priority value. 2. One shared queue for every elements, sorted by priority.