Hashing

21
76
118

If I have the above numbers and some function like below:

hashvalue := (i*i) mod 97

and using Linear Probing, where are the locations where the numbers
will end up?

Not sure what this is even asking for, anyone else know?
http://en.wikipedia.org/wiki/Linear_probing

21^2 = 441. Modulo 97: 53. The number will end up on index 53.
76^2 = 5776. Modulo 97: 53. The number will end up on index 54.
118^2 = 13924. Modulo 97: 53. The number will end up on index 55.
Topic archived. No new replies allowed.