Heap sort is a comparison-based
algorithm that uses a binary heap to sort an array
A binary heap is a complete
tree that satisfies the heap property.
behind heap sort is to create a heap out of the array to be sorted, and then repeatedly remove the root node of the heap
Heap sort has an average case and worst case time
Heap sort is not a stable sort, which means that the relative order of elements with equal keys may be changed by the sort
of heap sort is that it does not require additional memory space to sort the array.
Everything you should know about max heap