Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Off-the-cuff thought:

Could you solve the empty string hashes to zero problem by just adding one when computing hash codes?



But then strings with the hash code HASH_MAX would wrap to 0 instead.


You could, but that would break backwards compatibility.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: