2.2.1: 2.2.2: 参考算法如下 1 Select-sort(A,n) 2 for i1 to n-1 3 minA[i] 4 indexi 5 for ji+1 to n 6 if A[j]< min 7 indexj 8 minA[j] 9 if indexi 10 A[index]A[i] 11 A[i]min loop invariant: 从A[1]到A[j-1]这j-1个数是排