Heaps. A max (min heap is an array representation of a binary tree such that every node is larger (smaller) than all of its children. This definition naturally applies recursively, i.e. a heap of height 5 is composed of two heaps of height 4 plus a parent. Why do we leave the 0th position empty in the array?
Running times of various PQ implementations. Know the running time of the three primary PQ operations for an unordered array, ordered array, and heap implementation.
Heapsort. A max PQ provides an easy algorithm for putting items in ascending order. We simply insert everything into the PQ and then delete the max until the PQ is empty. By using a binary heap, we can sort in place - this is somewhat subtle.
Heapify. Understand how the bottom up heapify process works. Know that it is linear time.
expected time for insert is lower expected time for delMax is lower expected storage cost is lower insert has lower worst-case order of growth delMax has lower worst-case order of growth max has lower worst-case order of growthAnswer to above question