Question: A hash table contains 1 0 0 0 slots, indexed from 1 to 1 0 0 0 . The elements stored in the table have

A hash table contains 1000 slots, indexed from 1 to 1000. The elements stored in the table have keys that range in value from 1 to 99999. Which of the following hash functions would work correctly? And explain why.
(a) Key MOD 1000
(b)(Key-1) MOD 1000
(c)((Key+1) MOD 999)
(d)(Key MOD 1000)+1

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 Databases Questions!