100 Khan.randRange(0, 9999) Math.floor(key / M)
Given a hash table size of 100, a key in the range 0 to 9999, and using the binning hash function, what slot in the table will key hash to?

CorrectAnswer

Each slot in the hash table gets 1/100 of the range.

Given that we have 10,000 key values (0 to 9999), there are 100 values that hash to each slot.

We can compute this simply by calculating key/100 (rounding down).

The answer is CorrectAnswer.