Example

Let's consider a perfect hash function for the names in this class.

h(k): Take k's last name. Add 26 times the letter value (a=1,z=26) of the first letter of the last name to the letter value of the last letter of the last name.

This assigns each of you a distinct code.

What's n, m?


next up previous
Next: Collisions Up: HASHING BASICS Previous: Hash Function