Question: For a hash table, assume the initial array is of size 5 . Whenever a rehash occurs, the new array size is the smallest prime

For a hash table, assume the initial array is of size 5. Whenever a rehash occurs, the new array size is the smallest prime number that is greater than 2 times the original array size. For example, if the array size were 7, then the new array size would be 17 since 17 is the smallest prime number greater than 14. When rehashing, you should use the algorithm described in class.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!