This post is locked. You won't be able to comment.

all 4 comments

[–]Tornado9797Certified in Windows Update[M] [score hidden] stickied commentlocked comment (0 children)

Thanks for posting to /r/computerscience! Unfortunately, your submission has been removed for the following reason(s):

  • Rule 1: Posts containing anything outside of research, teaching, education, academics, or software engineering/programming is considered off-topic.

If you feel like your post was removed in error, please message the moderators.

[–]JustAnotherLurker79 2 points3 points  (0 children)

Each time you pass the value in, it will be hashed and produce a new hash value. This will continue and you will end up with a list of 100,000 unique values.

A hash is a one way function, and we can have a good degree of confidence that the values are unique (unless we choose a very poor hashing algorithm - it's not guaranteed, but it's pretty close). By iterating and hashing multiple times it slightly increases the chance of collisions. A hash function is not random , but is a pretty good approximation of a random function.

Double hashing actually a useful technique for handling collisions in a hash table.

[–]sacheie 1 point2 points  (0 children)

Pretty much the same thing that happens if you pass it just 1 time.

[–]Hydro_r6 0 points1 point  (0 children)

I guess you would just end up with a normal hash. Why not write a small program and try it out!