当前位置: 首页 > 工具软件 > perfect-ssm > 使用案例 >

Perfect hashing (And Minimal perfect hashing)

锺离俊雄
2023-12-01

Perfect Hashing:

A hash function that is injective—that is, maps each valid input to a different hash value—is said to be perfect. 

With such a function one can directly locate the desired entry in a hash table, without any additional searching. 


Minimal perfect Hashing:

A perfect hash function for n keys is said to be minimal if its range consists of n consecutive integers, usually from 0 to n−1. Besides providing single-step lookup, a minimal perfect hash function also yields a compact hash table, without any vacant slots. Minimal perfect hash functions are much harder to find than perfect ones with a wider range.



 类似资料:

相关阅读

相关文章

相关问答