Sorting Dr. Yingwu Zhu Heaps A heap is a binary tree with properties: It is complete Each level of tree completely filled Except possibly bottom level (nodes in left most…