題組內容

六、 Double hashing
A hash table with size 7 is used to store integer keys. Double hashing
is used to resolve collisions. The hash function is H(x) = k mod 7,
and the second hash function is H2(k) = number of digits in k.

0 1 2 3 4 5 6

(b) Explain why the table size is better to be a prime number. (10%)