摘要
文中详细介绍并分析了归并排序算法的优缺点,针对归并算法的强制把数据划分两份进行了改进,提出按照数据本身具有的规律进行智能归并排序划分的方法。该方法将局部有序的记录块作为一组,避免对已经有序的数据划分再归并;而对局部逆序的记录块先进行内部旋转再进行分组。并且针对归并算法拷贝数据费时的缺点,采用了原数据空间与临时数据空间依次交换的方法减少数据的大量拷贝,最后给出了相应的C语言描述和试验数据。
This article has introduced and analyzed the advantage and disadvantage of the merge sort algorithm in detail. In connection with the compelling feature of merge sort algorithm, data is divided into two parts to be improved, along with the proposal of the method of carrying on intelligently merge sort according to the discipline of data itself .This method combines record block which is the partial ordered as a group in case that the ordinal data be divided and merged. After partial reversible ordered record block being internal revolved, then the data can be divided into groups. In view of time--consum ing disadvantage of copying data based on the merge algorithm, the method of exchanging the original data space and the temporary data space in turn to reduce massive copies of data has been applied. Finally, the corresponding C language description and tentative data has been raised.
出处
《电子设计工程》
2011年第21期53-55,共3页
Electronic Design Engineering
关键词
归并排序
快速排序
排序算法
智能排序
merge sort
quick sort
sorting algorithm
intelligently sort