2 ms·
Can someone help me understand the value of hashing? If you’re using modulus to bucket, why not just use the string length or something? Is it because the value
by bryzaguy 6y ago
Can someone help me understand the value of hashing? If you’re using modulus to bucket, why not just use the string length or something? Is it because the values will distribute across buckets more uniformly?
- joshlemer 6y agoYes that's exactly right. Taking the length of a string could be considered a hash function, it's just a very poor one.