
Example Hash Functions
If the keys are integers then key%T is
generally a good hash function, unless the
data has some undesirable features.
For example, if T = 10 and all keys end in
zeros, then key%T = 0 for all keys.
In general, to avoid situations like this, T
should be a prime number.