(Recall that M
refers to the size of a hash table.)
A hash function must:
Return a value between 0 and M-1
- Return a value between 1 and
M
- Return the position of a free slot in the table
- Return the hash value for the key
- Return values in equal distribution throughout the table
A hash function should always give you a legal index into
the hash table array.