Priority Queue

A priority queue is an abstract data type that maintains a multiset of items.

Underlying Data Structures

The following data structures can be considered to implement a priority queue, with differing time complexities:

StructureInsertremoveMin
Unordered arrayO(1)O(n)
Ordered arrayO(n)O(1)
AVL treeO(logn)O(logn)