GATE | GATE-CS-2004 | Question 7

Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod 10, which of the following statements are true?


1.    9679, 1989, 4199 hash to the same value
2.    1471, 6171 hash to the same value
3.    All elements hash to the same value
4.    Each element hashes to a different value 

(A) 1 only
(B) 2 only
(C) 1 and 2 only
(D) 3 or 4


Answer: (C)

Explanation: The hash value for 9679, 1989, 4199 is 9 and hash value for 1471, 6171 is 1.

Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.