摘要: #includeusing namespace std;void insertSort(int arr[],int length,int record[]){ int max,pos; for(int k=0;kmax){ max=arr[j]; pos=j; } } arr[pos]=0; record[length-k-1]=pos; }}int main(){ int arr[]={2,5,3,7,1,6}; int arr_len=s... 阅读全文
posted @ 2014-02-19 20:12 开心成长 阅读(239) 评论(0) 推荐(0) 编辑