Perfect hash functionIf all keys are known ahead of time, a perfect hash function can be used to create a perfect hash table that has no collisions. If minimal perfect hashing is used, every location in the hash table can be used as well. Perfect hashing allows for constant time lookups in all cases. This is in contrast to most chaining and open addressing methods, where the time for lookup is low on average, but may be very large, O(n), for instance when all the keys hash to a few values. - Study24x7
Social learning Network
17 Mar 2019 09:54 AM study24x7 study24x7

Perfect hash function
If all keys are known ahead of time, a perfect hash function can be used to create a perfect hash table that has no collisions. If minimal perfect hashing is used, every location in the hash table can be used as well. Perfect hashing allows for constant t...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles