摘要: 归并排序(MergingSort),是又一类不同的排序方法。“归并”的含义是将两个或两个以上的有序表组合成一个新的有序表。时间复杂度为O(nlog2n)。const int count = 9;// 2-路归并排序之递归形式void CMergingSort::Path2MergingSort(void){ int L[count] = {0, 49, 38, 65, 97, 76, 13, 27, 49}; MSort(L, L, 1, count - 1); //打印排序结果。 for (int i = 0; i < count; ++ i) { cout << L[i] 阅读全文
posted @ 2011-05-06 23:09 星晨_jqren 阅读(966) 评论(0) 推荐(0) 编辑