Question:medium

Which of the statement(s) is/are True for the given question.
Data elements are: 7, 5, 17, 13, 9, 27, 31, 25, 35.
Hash Table Size: 7
Hash Function: H(I) = (Data element) mod (Hash Table Size)
Options:
(A) Element 27 will create collision.
(B) Element 25 will create collision.
(C) Element 35 will create collision.
(D) Element 31 will create collision.
Choose the correct answer from the options given below:

Updated On: Jan 16, 2026
  • (A), (B), and (C) only
  • (A), (C), and (D) only
  • (B), (C), and (D) only
  • (A), and (D) only
Show Solution

The Correct Option is B

Solution and Explanation

To detect hash table collisions, compute the hash function \(H(I) = \text{Data element} \mod \text{Hash Table Size}\) for each element. The hash table size is 7.
1. Hash value calculation for each element:
  • 7: \(7 \mod 7 = 0\)
  • 5: \(5 \mod 7 = 5\)
  • 17: \(17 \mod 7 = 3\)
  • 13: \(13 \mod 7 = 6\)
  • 9: \(9 \mod 7 = 2\)
  • 27: \(27 \mod 7 = 6\)
  • 31: \(31 \mod 7 = 3\)
  • 25: \(25 \mod 7 = 4\)
  • 35: \(35 \mod 7 = 0\)
2. Collision identification:
  • Element 27 collides with 13 at hash index 6.
  • Element 31 collides with 17 at hash index 3.
  • Element 35 collides with 7 at hash index 0.
  • Element 25 has a unique hash index 4, thus no collision.
3. Conclusion:
Elements that will create collisions are:
  • (A) Element 27
  • (C) Element 35
  • (D) Element 31
The correct selection is: (A), (C), and (D) only.
Was this answer helpful?
0


Questions Asked in CUET (UG) exam