Question: How can you change the selection sort algorithm so that it sorts the elements in descending order (that is, with the largest element at the
How can you change the selection sort algorithm so that it sorts the elements in descending order (that is, with the largest element at the beginning of the array)?
Step by Step Solution
3.34 Rating (157 Votes )
There are 3 Steps involved in it
Selection sort is a simple comparisonbased sorting algorithm that sorts an array by repeatedly selec... View full answer
Get step-by-step solutions from verified subject matter experts
