Question: What algorithm does the following pseudocode perform? Declare Integer startScan Declare Integer minIndex Declare Integer minValue Declare Integer index For startScan = 0 To arraysize
What algorithm does the following pseudocode perform?
Declare Integer startScan Declare Integer minIndex Declare Integer minValue Declare Integer index For startScan = 0 To arraysize 2 Set minIndex = startScan Set minValue array[startScan] = For index = startScan+ 1 To arraySize 1 If array[index] < minValue array[index] Set minValue Set minIndex End If = = - index End For Call swap (array [minIndex], array[startScan]) End For
Step by Step Solution
3.34 Rating (154 Votes )
There are 3 Steps involved in it
The algorithm performed by the pseudocode is selection sort Selection sort is an inplace sorting alg... View full answer
Get step-by-step solutions from verified subject matter experts
