By continuing in this manner you can sort the array into


Heap sort is not the only way to sort an array using a heap. In this exercise you will explore a less efficient algorithm. After building an initial heap, as you would in the first step of a heap sort, the largest value will be in the first position of the array. If you leave this value in place and then build a new heap using the remaining values, you will get the next largest value in the entire array. By continuing in this manner, you can sort the array into descending order. If you use a minheap instead of a maxheap, you will sort the array into ascending order.

a. Implement one of these sorts as the method newSortUsingAHeap.

b. What is the Big Oh performance of this method?

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: By continuing in this manner you can sort the array into
Reference No:- TGS02196166

Expected delivery within 24 Hours