摘要
为了解决经典快速排序算法在面对待排序数据事先有序,大量重复数据,递归层数过深以及排序稳定性等诸多问题时暴露出来的缺陷,从枢轴的合理选择、三路划分、与其他排序法结合和尾递归优化等多个方面分析和总结了优化经典快速排序算法的各种策略,在实际使用快速排序算法时具有一定的参考价值。
In order to solve the problems exposed by the classical quick sort algorithm,such as ordered data in advance,a large num⁃ber of repeated data,too many recursive layers,and sorting stability,etc,this paper analyzes and summarizes various strategies of optimizing classical quick sort algorithm from the aspects of reasonable selection of pivot,three-way division,combination with oth⁃er sorting algorithm and tail recursive optimization,it has certain reference value in the actual use of quick sort algorithm.
作者
李驰
LI Chi(Department of Computer Science and Software Engineering of Jincheng College,Sichuan University,Chengdu 611731,China)
出处
《电脑知识与技术》
2021年第1期226-228,共3页
Computer Knowledge and Technology
关键词
快速排序
算法优化
枢轴
三路划分
排序稳定性
尾递归优化
quick sort
algorithm optimization
pivot
three-way division
sorting stability
tail recursive optimization