Loop Invariant (for Inner Loop)
Initial:
Intermediate:
Final:
where
A[minLoc] is smallest in A[k..i-1]
All values in > are greater than A[minLoc]
No value in >= is smaller than A[minLoc]
All values in ? are unknown.
minLoc
>
>
>=
minLoc
minLoc
Previous slide
Next slide
Back to first slide
View graphic version