摘要
数据处理中经常用到的核心运算就是排序。在一些商用计算机上,用在排序上的CPU时间达到20%~60%。[1]本文对选择排序的算法进行了优化,采用两端同时排序,其比较次数是常用的选择排序的一半,从而大大降低了计算机运行次数,大幅提高了计算机工作效率。在其他排序算法中也可以借鉴这种方法。
The core computation commonly used in data processing is sorting. The percentage of CPU time used in sorting is from 20% to 60% in some business computers. This paper brings forward an optimized selective sorting algorithm by sorting from both ends simultaneously. Since the time of comparison in this sorting is only half of the commonly used selective sorting, the computer running time is greatly decreased, and the computer work efficiency is highly increased. This sorting method can be used as reference in other sorting algorithm.
出处
《软件》
2012年第9期104-105,共2页
Software
关键词
数据结构
算法优化
选择排序
C语言程序
Data Structure
Algorithm Optimization
Aelection Sort
The C Programming Language