ā Question
Rewrite the INSERTION-SORT procedure to sort into monotonically decreasing instead of monotonically increasing order.
š” Answer
A monotonically decreasing order means starting from the highest element to the lowest: 23,22,21,20
The monotonically increasing order for insertion sort is:
The monotonically decreasing order would be: