Our simple hash function will map the keys to indices like this:
In this example, the letters I and A collide, as well as the letters S and L. The pictures below show:H(S) = 5 H(P) = 2 H(I) = 2 H(N) = 0 H(A) = 1 H(L) = 5
Notice that any letter we insert must end up in slot 4. Inserting T20, H(T) = 6, yields: this picture:
And the total number of probes is now 14.
Our simple hash function will map the keys to indices like this:
The picture below shows the hash table after inserting each letter:H(F) = 6 H(L) = 5 H(E) = 5 H(T) = 6 H(C) = 3 H(H) = 1
The total probe count is 11.