 Build-Max-Heap runs
Max-Heapify on each of the remaining tree nodes.Heaps are commonly implemented with an array.Any binary tree can be stored in an array, but because a binary heap is always a complete binary tree, it can be stored compactly.