I've recently written an article about Priority Queue.
A priority queue is a collection of elements such that each element has been assigned a priority and the order in which elements are deleted and processed comes from the following rules:
- An element of higher priority is processed before any element of lower priority.
- If two elements has same priority then they are processed according to the order in which they were added to the queue.
The best application of priority queue is observed in CPU scheduling.
- The jobs which have higher priority are processed first.
- If the priority of two jobs is same this jobs are processed according to their
position in queue.
- A short job is given higher priority over the longer one.
For More Feel Free to check it
Click to view Priority Queue
For more C references: C Materials
For more Data structure References: Data structure and Algorithm
Labels: bsccsit, c. data structure, csit, nepal