Question: Comp Sci C++ For Exercises 1 - 5, use the following values 66 41 87 90 126 140 145 153 177 285 393 395 467

Comp Sci C++
For Exercises 1 - 5, use the following values 66 41 87 90 126 140 145 153 177 285 393 395 467 566 620 735 1. Store the values into a hash table with 20 positions. Use "key % tableSize" as the hash function and the linear probing method of resolving collisions 2. Store the values into a hash table with 20 positions, using rehashing as the method of collision resolution. Use "key % tables ize" as the hash function, and "(key + 3) % table-Size" as the rehash function Note: rehashing is applied to each value who has collision 3. Store the values into a hash table with ten buckets, each containing three slots. If a bucket is full, use the next (sequential) bucket that contains a free slot. 4. Store the values into a hash table that uses the hash function "key % 10" to determine into which of ten chains to put the value. 5. Fill in the following table, showing the number of collisions needed to find each value using the hashing representations given in Exercises 1- 4. Number of Comparisons Value Exercise 1Exercise 2Exercise 3 Exercise 4 467 566 735 285 87
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
