Question: Please do all the questions, no coding, just explanation 6. Hash Table (20 pts;6+7+7) a) You are given a hash table of initial capacity 5,
Please do all the questions, no coding, just explanation



6. Hash Table (20 pts;6+7+7) a) You are given a hash table of initial capacity 5, and need to use the hash function h(key) = key mod table_capacity. Create the smallest dataset of distinct non-negative integer keys that will be inserted in the hash table so that, after inserting all the integers in the dataset, the average number of comparisons for successful search is less than 3, and the worst case number of comparisons is 6. Show the hashtable with all your dataset integers in it, and work out the average. (Assume that the load factor threshold is large enough that no rehashing will happen, and that all items are equally likely to be searched.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
