CS210 Tutorial 12
Complete the following exercises pasted below:
Q1. Draw the 11-entry hash table that results from using the hash function, h(i) = (3i+5) mod 11, to hash the keys
12, 44, 13, 88, 23, 94, 11, 39, 20, 16, and 5,
assuming collisions are handled by chaining.
Q2. Do the same as above using Linear Probing
Q3. Show the result of entering the same keys to a table of size 19 using the new hash function h(k) = 3k mod 17: use linear probing
Q4. Use double hashing to enter the following keys in an array of size 13.
98, 33, 36, 96, 77, 11, 27, 84, 66, 58
Use primary hash function h(k) = k % 13.
Secondary hash function s(k) = 7 - k%7.