Em uma tabela “hash” de tamanho 𝑠=7 serão armazenadas as seguintes chaves, nesta ordem:
50, 70, 30, 40, 60, 55, 65.
Considere que a função “hash” é ℎ (𝑥𝑦)=(𝑥+𝑦) 𝑚𝑜𝑑 𝑠, onde x e y são os dígitos da chave.
Considere que a função “rehash” é 𝑟(𝑥𝑦)=(ℎ(𝑥𝑦)+1) 𝑚𝑜𝑑 𝑠, onde x e y são os dígitos da chave.
A tabela “hash” após a inserção dessas chaves, utilizando as funções de “hash” e “rehash”, é:
30, 40, 50, 55, 60, 65, 70.
40, 50, 60, 70, 55, 65, 30.
70, 65, 60, 55, 50, 40, 30.
60, 50, 40, 30, 65, 55, 70.
70, 55, 65, 30, 40, 50, 60.