Fill in the blanks for a selection sort that results in a descending sort (largest to smallest) and the selection finds
Posted: Sun May 15, 2022 1:35 pm
Fill in the blanks for a selection sort that results in a descending sort (largest to smallest) and the selection finds the maximum value. public static void selection Sort( int vec[] ) { int maxPos; // Index of largest after each pass. int top; int temp; for (top = ; top<vec.length top++) { maxPos = for (next = top+1; i < vec.length; next { if (vec[ ] > vecí ]) maxPos = ; } = vecí ]; vec[ ] = vec[maxPos]; vec[maxpos] = ; } }