Question: Given the numbers [5,-12,-72,69,32,25,-45,19] and a hash function h(k) = k mod 13, show the contents of the hash table after insertion of each of
Given the numbers [5,-12,-72,69,32,25,-45,19] and a hash function h(k) = k mod 13, show the contents of the hash table after insertion of each of the numbers 25 and 19 for (a) separate chaining (b) open addressing with linear probing (c) open addressing with quadratic probing. Hash table size is 13. Insertions are carried out as in the given sequence.
For the final hash tables in parts (a)-(c) above, compute the expected time for a successful lookup and unsuccessful lookup. Count a cost of 1 for computation of the hash function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
