2005年6月28日

摘要: 1.插入排序:1.1直接插入:1.1.1顺序存储voidInsertSorting(intR[],intn){for(inti=1;i<n;i++){inttemp=R[i];intj=i-1;while((j>=0)&&(temp<R[j])){R[j+1]=R[i];j--;}R[j+1]=temp;}}1.1.2链式存储voidInsertSorting(L... 阅读全文
posted @ 2005-06-28 08:28 天外飞仙 阅读(1144) 评论(1) 推荐(0) 编辑

2005年6月20日

摘要: 1、冒泡排序的排序部分子程序:while(!change){change=1;for(j=index;j>0;j--){for(I=0;I<j-1;I++){if(list[i]>list[I+1]){list[I]交换list[I+1];change=0}}}我认为while()循环好象并不是必须的,对不?2、插入排序子程序部分:voidinsertsort(int*list,... 阅读全文
posted @ 2005-06-20 15:44 天外飞仙 阅读(949) 评论(6) 推荐(0) 编辑
 
摘要: 好的开始是成功的一半,今天注册,今天第一次发言,看看情况。 阅读全文
posted @ 2005-06-20 15:20 天外飞仙 阅读(540) 评论(0) 推荐(0) 编辑