Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • So, can i say that for 2^32 different strings, the hashcode function will always produce different hashcode? Commented Apr 11, 2012 at 9:18
  • 1
    @Zara Actually it even says quite the opposite! Having 2^32 different strings you will most likely have a collision (or even several..). Commented Apr 12, 2012 at 1:20
  • @jory - yes you are right. It's an example of the birthday paradox. (It is not entirely impossible that 2^32 different randomly generated strings will all have different hashcodes. Just vanishingly improbable.) Commented Apr 12, 2012 at 2:04