Chinaunix首页 | 论坛 | 博客
  • 博客访问: 178823
  • 博文数量: 36
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 410
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-04 12:39
文章分类

全部博文(36)

文章存档

2010年(1)

2009年(35)

我的朋友

分类: LINUX

2009-04-20 22:44:11

偶尔看到了关于hash sorting算法的讨论,顺便查找了一下

优点:
1. Linear time complexity, even in the worst case; for the in-situ proportional to the data structure size, and for the direct proportional to the data list size.
2. The hash sort puts data elements in the correct position, does not move them afterward – data quiesence
3. Data independence – data elements in the data set are mapped by their unique value, and do not depend on the predecessor or successor in the data set
4. High speed lookup is possible once the data is sorted – faster than binary search; or alternatively, to the approximate location within the data structure.
劣势:
1. Sparsity of data values in range – wasteful of space
2. Multi-dimensional data structure is required – square planar matrices are inconsistent with underlying linear memory in one-dimension
3. Works only with numeric values, requires conversion for non-numeric value
4. The data range of values must be known for the algorithm to work effectively


阅读(1188) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~