Khan.randRange(7, 9) Khan.randRange(4, arrSize-1) selsortPRO.initJSAV(arrSize, sortPos)

In the array of size arrSize displayed below, the element at position sortPos is highlighted. The array represents an intermediate state in Selection Sort, with all elements to the right of the highlighted element holding the biggest values in the array.

Perform the next iteration of Selection Sort, to put the proper array element into the highlighted position. To swap two elements, click on the first and then click on the second.

[selsortPRO.userInput]
if (!selsortPRO.checkAnswer(arrSize) && !guess[0]) { return ""; // User did not click, and correct answer is not // initial array state } else { return selsortPRO.checkAnswer(arrSize); }

Determine the record that should appear at index sortPos using Selection Sort.

Selection sort will place the largest record in the range [0 to sortPos] at position sortPos.