摘要: 算法思想: 先假设length=1; 表示先将相邻的2个元素进行排序。A[0]与A[1],A[2]与A[3].............A[N-2]与A[N-1](N为偶数 假设) 然后length=2;A[0]A[1]是有序序列,与A[2]A[3] 进行2个有序序列的归并。 依次类推。 错误分析: 阅读全文
posted @ 2016-09-10 21:50 乐乐章 阅读(249) 评论(0) 推荐(0) 编辑
摘要: void Merge(ElementType A[],ElementType Temp[],int Left,int Right,int RightEnd) { int temp,i, LeftEnd,count; LeftEnd=Right-1;// 超级错误 count=RightEnd-Lef 阅读全文
posted @ 2016-09-10 21:01 乐乐章 阅读(474) 评论(0) 推荐(0) 编辑