正在加载图片...
end;p〔i〕:=pri〕-1end a〔p(i):=x end, output data end. 注:冯克清.贺津江同志和教研室其他同志对本文提出了许多宝费意见,在此致谢。 A New Efficient Algorithm For Internal Sorting Li Hui Hua Abstract In this paper,a new internal sorting algorithm is presented which is espe- cially suited for sorting record set in which the total number of key values is much smaller than that of records Viz.many records have the same value. If we assume the total number of records to be sorted is N and the total number of key values is M,the sorting efficiency-the total number of compar- isons-of classical algorithms (e.g.quicksort,heapsort)is O(Nlog2N), unrelated to M.Under the same assumption,the sorting efficiency of the new al gorithm presented in this paper that uses one kind of queue with single pointer data structure,through two passes,is 2'N'log2M,If some conditioing are added,only one pass is needed and the efficiency is Nlog2 M.The moving total number of the new algorithm is N'M/4,and the extra memory space required is M,pointers and M key value locations, 。 95门‘ , 〔 〕 〔 卜 , 〔 〔 〕 〕 注 冯克清 , 贺幸江 同志和 教研室其他同志对本文提出了许多宝贵意见 , 在此致谢 , , 一 - , , 。 , , , , ’ ,
<<向上翻页
©2008-现在 cucdc.com 高等教育资讯网 版权所有