links: [[Algorithms MOC]]
---
# What is PriorityQueue
Priority Queue is an Abstract Data Tree (ADT) that operates similar to a normal queue except that **each element has a certain priority** . The priority of the elements in the priority queue determines the order in which elements are removed from the PQ.
Note: It supports only those elements that are comparable. Hence priority queue arranges the elements in either ascending or descending order.
# Characteristics of Priority Queue
1. Each item has a priority associated to it.
2. An item with the highest priority is moved to the front and deleted first
3. If two elements share the same priority value, then the priority queue follows the first-in-first-out principle for dequeue operation
# How can you implement priority queue
1. [[Linked List]]
2. [[Arrays]]
3. [[Binary Heap]]
4. [[Binary Search Tree]]
---
tags: #priority-queue #queue
source:
- [Priority Queue Introduction](https://www.youtube.com/watch?v=wptevk0bshY)