Priority Queue

Priority queue is an abstract data type which is like a regular queue or stack data structure but where each element has a priority assigned to it. In priority queue, an element with highest priority assigned is served first, if two elements have same priority then they are served according to the order they were enqueued.

Read this article to understand Priority Queue in depth

Have a doubt or thought? Join the discussion now


This is a companion discussion topic for the original entry at http://iq.opengenus.org/priority-queue/