摘要
提出了一种新的排序算法:端点排序算法。其方法为:依次找出数据总数为N的数列最小和最大值,把二者放在本次所排数列的两端,再把剩余两端之间的数据总数为N-2的数列的最小值和最大值找出,放在此数列的两端,依此类推,直至数列中间,实现整个数组的排序。实验表明,该算法具有与冒泡排序更快的性能。在数据个数较多的情况下优于选择排序。
A new sorting algorithm,endpoint sort algorithm is proposed.The method(assuming ascending order) is to find the minimum and maximum data values whose data total number is N array first,and then exchange the minimum one with the first data of the array,and exchange the maximum one with the last data of the array;after that,find the minimum and maximum data values in the residual data whose data total number is N-2 array,and then exchange the minimum one with the second data of the original array,and exchange the maximum one with the N-1 data of the original array,and so forth,until the entire array has been sorted.Experiments show that the endpoint sort algorithm is faster than the bubble one,and is faster than the selection sort algorithm when the array has more than 50 000 data.
出处
《现代电子技术》
2011年第24期80-81,共2页
Modern Electronics Technique
关键词
排序算法
端点排序算法
冒泡排序算法
选择排序算法
sort algorithm
endpoint sort algorithm
bubble sort algorithm
selection sort algorithm