计算机与现代化 ›› 2010, Vol. 1 ›› Issue (10): 47-49.doi: 10.3969/j.issn.1006-2475.2010.10.012

• 软件工程 • 上一篇    下一篇

一种新的基于哈希函数的排序算法

王秋芬,邵艳玲   

  1. 南阳理工学院计算机科学与技术系,河南 南阳 473004
  • 收稿日期:2010-06-07 修回日期:1900-01-01 出版日期:2010-10-21 发布日期:2010-10-21

A New Sorting Algorithm Based on Hash Function

WANG Qiu-fen, SHAO Yan-ling   

  1. Department of Computer Science and Technology, Nanyang Institute of Technology, Nanyang 473004, China
  • Received:2010-06-07 Revised:1900-01-01 Online:2010-10-21 Published:2010-10-21

摘要: 提出一种哈希函数分档的排序算法。根据数组下标递增的特点,针对任意分布整数,建立有效的哈希函数,通过反复映射完成排序。分析算法的时间和空间复杂度,实验验证算法的运行效率。算法分析和实验结果表明:算法的时间和空间复杂度均为O(n),在问题规模较大时,效率优势明显。

关键词: 哈希函数, 排序, 算法, 复杂性

Abstract: The paper brings forward a new sorting algorithm based on Hash function. According to the characteristic of the array subscript progressive increase, it establishes effective Hash function by grading to random distributed integers, and completes sorting by mapping repeatedly. Time and space complexity is analyzed, and algorithm’s efficiency is verified by experiments. Algorithm analysis and experimental results show that the algorithm’s time and space complexity is O(n). It improves obviously algorithm’s efficiency when the scale of the problem is large.

Key words: Hash function, sort, algorithm, complexity

中图分类号: