摘要
介绍了两种较为成熟的排序方法冒泡法和选择排序法,指出这两种排序方法都可在原来基础上实现双向排序。并以选择排序法为例,给出了新算法的算法思想、算法描述和算法的程序实现。通过分析算法的比较次数和移动次数得出结论:新算法和传统的排序算法方法同样简单,但排序效率相同甚至更高,均可作为实际排序和教学过程中的思路参考。
This paper introduces two mature sorting methods: bubble sort and selection sort, and points out that these sorting methods could be used to realize the two - direction sort. By the examples of selection sort, this paper gives the thought, the description of the new algorithm and the procedure of its realization. This paper draws a conclusion by analyzing the comparison number of times and the motion number of times of the algorithm:the method of the new algorithms is as simple as that of the tradition sorting algorithms, while the sorting efficiency is even more highly. When you are designing a program or teaching , you can refer to them.
出处
《绵阳师范学院学报》
2007年第11期98-99,104,共3页
Journal of Mianyang Teachers' College
关键词
冒泡排序法
选择排序法
双向排序
算法
bubble sort
selection sort
two - direction sort
algorithm