While hashing 5 integer keys namely 5, 12, 23, 32, 104 using the hash function…
2026
While hashing 5 integer keys namely 5, 12, 23, 32, 104 using the hash function h(key) = key % 10 into a hash table with 10 buckets the number of keys that will collide is
- A.
0
- B.
1
- C.
2
- D.
3
Attempted by 159 students.
Show answer & explanation
Correct answer: C
Keys hashed: 5->5, 12->2, 23->3, 32->2, 104->4. Keys 12 and 32 collide at bucket 2. Total keys involved in collision is 2.