How do you modify the selectionSort function in Listing to sort numbers in decreasing order?
Listing SelectionSort.cpp
1 void selectionSort(double list[], l istSize)2 {3 for (int i = 0; i list[j])12 {13 currentMin = list[j];14 currentMinlndex = j;15 }16 }1718 // Swap list[i] with list[currentMinIndex] if necessary;19 if (currentMinlndex != i)20 {21 list[currentMinIndex] = list[i];22 list[i] = currentMin;23 }24 }25 }
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.