# Priority Queue
## With [[heap|Heap]]
- Mapping application objects and heap elements
- Using _handles_, the details are opaque to the queue.
- Store the mapping entirely inside the queue (e.g. using [[hash-table]])
- To increase the key, compare the key with the parent, and "float up", until
the max-heap property holds.
- To insert a key, first insert it to the end with the lowest key, then increase
its key.