插入排序(C#)
摘要:
usingSystem;publicclassInsertionSorter{publicvoidSort(int[]list){for(inti=1;i<list.Length;++i){intt=list[i];intj=i;while((j>0)&&(list[j-1]>t)){list[j]=list[j-1];--j;}list[j]=t;}}}publ... 阅读全文
posted @ 2006-03-04 16:38 阿伟 阅读(378) 评论(1) 推荐(0) 编辑