Sort the sorted

Report a typo

Suppose you have written a sorting program following the heapsort algorithm that sorts an array in ascending order.

We have provided you with three arrays: AA, BB, and CC of the same length. AA is already sorted in ascending order, BB is sorted in descending order, and CC contains data in random order.

Apply your sorting program to all of these arrays and measure the working time. Finally, arrange the arrays in the order in which they are sorted, from fastest to slowest.

Put the items in the correct order
C
B
A
___

Create a free account to access the full topic