• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2014, Vol. 36 ›› Issue (A2): 273-275.

• 论文 • Previous Articles     Next Articles

Sorting methods for selecting the top
k(k〈〈n)elements in a set of n elements 

FENG Guanghui,CHEN Shoukong   

  1. (Zhuhai College,Jilin University,Zhuhai 519041,China)
  • Received:2014-06-13 Revised:2014-08-20 Online:2014-12-25 Published:2014-12-25

Abstract:

In this paper,we firstly describe several common sorting methods,analyze their merits and shortcomings,and then propose some sorting methods which can determine the final position of at least one element during each trip of sorting.We discuss heapsort algorithm and quicksort algorithm in particular.Through the comparison of these methods,it shows that the quicksort is often better than heapsort when finding out the first several elements among a large number of elements.

Key words: sort;heapsort;quicksort