Separate Chaining

Use data structure (such as linked list) to store multiple items that hash to the same slot

1. use linked list
Collision: insert item into linked list
Find: compute hash value, then do Find on linked list

2. use BST
O(log N) time instead of O(N). But lists are usually small - not worth the overhead of BSTs

Open addressing (or probing or Closed Hashing)

Search for other slots using a second function and store items in first empty slot that is found

Separate chaining can take up a lot of space...

Given an item X, try cells h0(X), h1(X), h2(X), .., hi(X)
hi(X) = (Hash(X) + F(i)) mod TableSize
(Define F(0) = 0)

Linear: F(i) = i
Quadratic: F(i) = i2
Double Hashing: F(i) = i * Hash2(X)

details

最新文章

  1. [Java Collection]List分组之简单应用.
  2. yii的验证码
  3. Spring官网jar包下载方法
  4. ue4 build configuration的解释
  5. Android 开发框架汇总
  6. FTP搭建
  7. arraylist linkedlist性能测试
  8. Fix: Compile project encounter undefined reference to“xxx”error
  9. zend+xdebug单步调试
  10. jQuery.validate的this.optional(element)作用
  11. [数据库连接字符串] Access 连接字符串
  12. [topcoder]ActivateGame
  13. (DT系列五)Linux kernel 是怎么将 devicetree中的内容生成plateform_device
  14. [Java] 可运行 jar 记录
  15. github上写个人简历
  16. python 3.6 +pyMysql 操作mysql数据库
  17. Unity端游无法下载资源问题
  18. HDU3480-Division-斜率dp
  19. Javascript高级编程学习笔记(13)—— 引用类型(2)Array类型
  20. spring-data-jpa与mybatis的对比

热门文章

  1. iOS中block实现的探究
  2. Cocos2D-x权威指南: CCNode类方法:
  3. Android经常使用的五种弹出对话框
  4. TO DO NOW——送给奋斗着的程序“猿”们
  5. 使用boost中的线程池
  6. SPOJ 416 - Divisibility by 15(贪心)
  7. js框架页跳转
  8. compass的使用
  9. ADO.NET之使用DataGridView控件显示从服务器上获取的数据
  10. C#类、静态类