Exam-style question
Try this first
Using h(key) = key modulo 10, which pair of keys causes a collision?.
- A.12 and 23
- B.14 and 25
- C.18 and 28
- D.21 and 32
Model answer
What a good answer should say
- 18 and 28
Explanation
Why this works
18 modulo 10 and 28 modulo 10 both produce 8, so these two keys cause a collision.
Common mistake
No common mistake is linked to this question yet.
