Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and…

2025

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

  1. A.

    i only

  2. B.

    ii only

  3. C.

    i and ii only

  4. D.

    iii or iv

Attempted by 156 students.

Show answer & explanation

Correct answer: C

Explanation:

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

Explore the full course: Cocubes Preparation