##
## 目录
1.1 什么是哈希Hash
1.2 哈希函数 Hash Function
1.2.1 哈希函数性质
1.2.2 哈希函数的选择
1.2.3 Perfect Hash Function (PHF)
1.2.4 Minimal Perfect Hash Function (MPHF)
[Note]
1.3 什么是哈希表 Hash Table
1.3.1 Key statistics
1.3.2 Dynamic Resizing
1.3.3 ReHashing
1.4 冲突 Collsion
1.4 性能
1.5 哈希表的实现 Implementation
1.5.1 PHF以及MPHF的实现
1.5.2 Java Python 实现
1.6 应用 Applications
1.7 總結 Summary
1.7 References & External Links
### 1.1 什么是哈希Hash?
哈希表的实现 称之为 哈希,抑或 散列。(雜湊 For 台灣 )
哈希表在【平均】情况下以常数时间constant time 执行「插入」,「删除」和「查找」的技术。
```
为什么平均O(1)?原理?
最坏情况下呢? O(n) 为什么?
```
但是对于元素间的【排序】操作将不会得到有效的支持。
譬如FindMax,FindMin以及按序打印元素都是散列表所不支持的。<sup>[1]</sup>
哈希/散列 接收一个值,输出这个值的哈希值
维基百科<sup>[2]</sup>中有一段对其的介绍:
```
Selected From Wiki-Hash Table [2]:
The idea of hashing is to distribute the entries (key/value pairs) across an
array of buckets. Given a key, the algorithm computes an index that suggests
where the entry can be found.
```
### 1.2 哈希函数 Hash Function ?
哈希函数是可以将【任意大小】的数据映射为【固定】大小数据的一个函数。其返回数据的哈希值。
哈希函数的一个用处是用来实现哈希表Hash
## 目录
1.1 什么是哈希Hash
1.2 哈希函数 Hash Function
1.2.1 哈希函数性质
1.2.2 哈希函数的选择
1.2.3 Perfect Hash Function (PHF)
1.2.4 Minimal Perfect Hash Function (MPHF)
[Note]
1.3 什么是哈希表 Hash Table
1.3.1 Key statistics
1.3.2 Dynamic Resizing
1.3.3 ReHashing
1.4 冲突 Collsion
1.4 性能
1.5 哈希表的实现 Implementation
1.5.1 PHF以及MPHF的实现
1.5.2 Java Python 实现
1.6 应用 Applications
1.7 總結 Summary
1.7 References & External Links
### 1.1 什么是哈希Hash?
哈希表的实现 称之为 哈希,抑或 散列。(雜湊 For 台灣 )
哈希表在【平均】情况下以常数时间constant time 执行「插入」,「删除」和「查找」的技术。
```
为什么平均O(1)?原理?
最坏情况下呢? O(n) 为什么?
```
但是对于元素间的【排序】操作将不会得到有效的支持。
譬如FindMax,FindMin以及按序打印元素都是散列表所不支持的。<sup>[1]</sup>
哈希/散列 接收一个值,输出这个值的哈希值
维基百科<sup>[2]</sup>中有一段对其的介绍:
```
Selected From Wiki-Hash Table [2]:
The idea of hashing is to distribute the entries (key/value pairs) across an
array of buckets. Given a key, the algorithm computes an index that suggests
where the entry can be found.
```
### 1.2 哈希函数 Hash Function ?
哈希函数是可以将【任意大小】的数据映射为【固定】大小数据的一个函数。其返回数据的哈希值。
哈希函数的一个用处是用来实现哈希表Hash