min-heap or max-heap are not necessarily sorted arrays.
Is min heap ascending or descending?
minHeap is used to sort in descending order. maxHeap is used to sort in ascending order.
What is heap sort example?
The elements are eliminated in decreasing order for a max-heap and in increasing order for min-heap. Consider the following example: Suppose the array that is to be sorted contains the following elements: 11, 2, 9, 13, 57, 25, 17, 1, 90, 3. The first step now is to create a heap from the array elements.