logo

Question detail

Using h(key) = key modulo 10, which pair of keys causes a collision?

Try the question, check the answer, then read the explanation to understand the curriculum point.

At a glance

MCQ

Type

practice

Style

Topic

Hash tables

Exam-style question

Try this first

Using h(key) = key modulo 10, which pair of keys causes a collision?.

  1. A.12 and 23
  2. B.14 and 25
  3. C.18 and 28
  4. 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.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.