+1 vote
in Mathematics by kratos

The following values are to be stored in a hash table

25, 42, 96, 101, 102, 162, 197, 201

Use division method of hashing with a table size of 11. Use sequential method of resolving collision. Give the contents of array.

1 Answer

+2 votes
by kratos
 
Best answer

Table size is given as 11

H (25) = (25) mod 11 + 1 = 3 + 1 = 4

H (42) = (42) mod 11 + 1 = 9 + 1 = 10

H (96) = (96) mod 11 + 1 = 8 + 1 = 9

H (101) = (101) mod 11 + 1 = 2 + 1 = 3

H (102) = (102) mod 11 + 1 = 3 + 1 = 4

H (162) = (162) mod 11 + 1 = 8 + 1 = 9

H (197) = (197) mod 11 + 1 = 10 + 1 = 11

H (201) = (201) mod 11 + 1 = 3 + 1 = 4

...