Repeated Minimum: Code
for i := 1 to n-1 do
for j := i+1 to n do
if L[i] > L[j] then
Temp = L[i];
L[i] := L[j];
L[j] := Temp;
endif
endfor
endfor
Fixed n-1 iterations
Fixed n-i iterations
Previous slide
Next slide
Back to first slide
View graphic version