Exercise 6 Name __________________
Score __/15
Document last modified:
- Demonstrate the insertion of of the keys 12, 15, 6, 3, 7, 9, 13, 4, 5, 11, 21, 10, 8 into a hash table with collisions resolved by chaining. Let the table have 4 slots and the hash function be h(k) = k mod 4.
- Find the largest number of key comparisons in a successful search in this table.
- What is the loading factor?
- What is the expected comparisons for an unsuccessful search?
- How many comparisons are required for a successful search for each key?
- Find the average number of key comparisons in a successful search in this table.