Page 1 of 1

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
by answerhappygod
Fill In The Blanks For A Selection Sort That Results In A Descending Sort Largest To Smallest And The Selection Finds 1
Fill In The Blanks For A Selection Sort That Results In A Descending Sort Largest To Smallest And The Selection Finds 1 (21.08 KiB) Viewed 89 times
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] = ; } }