Skip to content
Related Articles
Open in App
Not now

Related Articles

Data Structures | Hash | Question 5

Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 20 May, 2019
Improve Article
Save Article

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?
i. 9679, 1989, 4199 hash to the same value
ii. 1471, 6171 hash to the same value
iii. All elements hash to the same value
iv. Each element hashes to a different value
(GATE CS 2004)
(A) i only
(B) ii only
(C) i and ii only
(D) iii or iv

Answer: (C)


Hash function given is mod(10).
9679, 1989 and 4199 all these give same hash value i.e 9
1471 and 6171 give hash value 1 

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!