Priority Queue Explained With Simple Example
A Priority Queue is an abstract data type similar to Queue which has following properties
- Every element in the Priority Queue has a priority associated with it.
- An element with high priority will be dequeued first.
- If two element has same priority then they are dequeued based on normal Queue basis (FIFO).