摘要: |
介绍了一种快速的排序方法——堆排序。以一个简单的实例结合完全二叉树说明了该
算法的原理,给出了利用C语言实现该算法的代码,从时间复杂度和辅助存储空间的角度分
析了与其他排序算法相比较的优劣。实验表明,在对大量数据进行排序时,堆排序算法效率
较高。 |
关键词: 排序算法 快速排序 堆排序 时间复杂度 辅助存储空间 |
DOI: |
|
基金项目: |
|
Realization and Application of a Quick Sort Algorithm |
LI Pei-nan |
() |
Abstract: |
A quick sort method called heap sort is introduced.The principle of this method
is discussed by using a simple example together with completecinary tree.The cod
es for the method realized by C are provided.The advantages an disadvantages are
analysed in comparison with other sort methods in term of time frame and assis
t memory space. Experiment indicates when sorting mass data, the heap sort has b
etter efficiency. |
Key words: sort algorithm quick sort heap sort time complexity assist memory space |