NVS PGT CS 2019 Part-A
December 7, 2023Question 2397 – Linear-Algebra
December 7, 2023Hashing
|
Question 9
|
Which one of the following hash functions on integers will distribute keys most uniformly over 10 buckets numbered 0 to 9 for i ranging from 0 to 2020?
|
h(i) = i2 mod 10
|
|
|
h(i) = i3 mod 10
|
|
|
h(i) = (11 *i2) mod 10
|
|
|
h(i) = (12 * i) mod 10
|
Question 9 Explanation:
If we take first 10 elements, number of collisions taken by the hash function given by option (B) is less when compared to others.
Correct Answer: B
Question 9 Explanation:
If we take first 10 elements, number of collisions taken by the hash function given by option (B) is less when compared to others.
