NVS PGT CS 2019 Part-A
December 7, 2023
Question 2397 – Linear-Algebra
December 7, 2023
NVS PGT CS 2019 Part-A
December 7, 2023
Question 2397 – Linear-Algebra
December 7, 2023

Hashing

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?

A
h(i) = i2 mod 10
B
h(i) = i3 mod 10
C
h(i) = (11 *i2) mod 10
D
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.

Leave a Reply

Your email address will not be published. Required fields are marked *