堆(Heap) The operations commonly performed with a heap are: create-heap: create an empty heap heapify: create a heap out of given array of elements find-max or find-min: find the maximum item of a max-heap or a minimum item of a min-heap (aka, peek) d…