Priority Queue

Most priority queues are implemented using a binary heap (O(log(n) insertion and deletion) whereas a list has O(n) search/deletion

Heaps:

  1. must be complete

  2. Min/Max property

    • can check by starting at the root and recursively traversing.

A data structure for maintaining a set S of elements each with an associated value or key

we need insert, max, extractMax, changeKey