Example 1: a hash function for words
Suppose that the keys are English words.
m = 26 hash(w) = (initial letter of w) – ‘A’
All words with initial letter ‘A’ share bucket 0;…all words with initial letter ‘Z’ share bucket 25.
This is a convenient choice for illustrative purposes.
This is a poor choice for practical purposes: collisions are likely to be frequent in some buckets.