Exercise 12.15
Use the hash function hf(x) = x, m = 11 to map an integer value to a
hash table index. Insert the data 1, 13, 12, 53, 77, 29, 31, 22 into the
hash table.
Construct the hash table by using linear probe addressing.
Construct the hash table by using chaining with separate lists.
For both techniques, determine the load factor, the average number of
probes needed to locate a value in the table, and the average number of
probes needed to determine that a value is not in the table. For linears
probe addressing, when counting the number of probes needed to locate a
value that is not in the table, count the discovery of an empty slot as
a probe. For chaining with separate lists, record an encounter with the
end of a list as a probe.
