Question

Suggest a table size for re-hashing a hash table of size 8? Of size 13?

Suggest a table size for re-hashing a hash table of size 8? Of size 13?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Ans: size = 13, We should always take table size as a PRIME number

The reason why prime numbers are used is to minimize collisions when the data exhibits some particular patterns.

First things first: If the data is random then there’s no need for a prime number, you can do a mod operation against any number and you will have the same number of collisions for each possible value of the modulus.

But when data is not random then strange things happen. For example consider numeric data that is always a multiple of 10.

Add a comment
Know the answer?
Add Answer to:
Suggest a table size for re-hashing a hash table of size 8? Of size 13?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT