100 Khan.randRange(0, 9999) Math.floor((key * key) / 1000) % M
Given a hash table size of 100, a key in the range 0 to 9999, and using the Mid-square Method hash function, what slot in the table will key hash to?

CorrectAnswer

Assuming a 4-digit number, we want the middle two digits for the square of the key.

Use the Mid-square Method calculator to help you.

The answer is CorrectAnswer.