• edited by
13,822 views
32 32 votes

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

  1. I only
  2. II only
  3. I and II only
  4. III or IV

5 Answers

14 14 votes

This might Help to understand better

0 0 votes

(I) 9679mod10 = 9 ,1989mod10 = 9, 4199mod10 = 9 ( Same value )

(ii) 1471mod10 = 1 , 6171mod10 = 1 (Same value )

(iii) Here ,clearly all elements having different value so not this option .

(iv) Yes, Each Hashes having Different Values .

OPTION (C.) For (i.) and (ii.) Only is correct

• edited by
Answer:
Position:
Show:

Related questions

61 61 votes
5 answers 5 answers
25.3k
25.3k views
Arjun asked Feb 12, 2020
25,314 views
Consider a double hashing scheme in which the primary hash function is $h_1(k)= k \text{ mod } 23$, and the secondary hash function is $h_2(k)=1+(k \text{ mod } 19)$. Ass...
38 38 votes
3 answers 3 answers
9.8k
9.8k views
Kathleen asked Sep 18, 2014
9,772 views
The elements $32, 15, 20, 30, 12, 25, 16,$ are inserted one by one in the given order into a maxHeap. The resultant maxHeap is
31 31 votes
3 answers 3 answers
10.4k
10.4k views
Kathleen asked Sep 18, 2014
10,368 views
Level order traversal of a rooted tree can be done by starting from the root and performingpreorder traversalin-order traversaldepth first searchbreadth first search
27 27 votes
4 answers 4 answers
11.2k
11.2k views
Kathleen asked Sep 18, 2014
11,152 views
The best data structure to check whether an arithmetic expression has balanced parentheses is aqueuestacktreelist