摘要:
2.1-1:2.1-2:NON-INCREASING-INSERTION-SORT(A) forj: 1~ length(A)-1: if(A[j]< A[j-1]): key= A[j]; t = j-1; while(A[t]< key && t>=0): A[t+1]= A[t]; t--; A[t]= key; returnA;2.1-3:// Assumption: Ifthere're duplicated elements, only return// the index of the first element.LINEAR-SEARC 阅读全文