Question: Suppose the selectionSort method is executed with the array (3, 12, 7, 2,9,14,8). 1) When iis assigned with in the outer loop, what is j
Suppose the selectionSort method is executed with the array (3, 12, 7, 2,9,14,8). 1) When iis assigned with in the outer loop, what is j assigned with in the inner loop? Oo 0 1 O 3 2) What is the final value for the variable i inside the inner loop? 5 6 07 3) Which statement best describes the following code fragment taken from the selectionSort() method? int temp-numberga, numbers = numbers indexSmallesti numbers (indexSmallest) - temp. Shifts the value at position indexSmallest to the right one space in the array O Tests to see if the value at numbers indexSmallest) is smaller than the value at numbers[ Swaps the values located at indices and indexSmallest
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
