Qm

Two key sets colliding in one hash table

Set A has 5050 keys and set B has 5050 keys, all hashed into the same table of 10001000 slots (each key lands in a uniformly random slot independently).

What is the probability that at least one key from A lands in the same slot as at least one key from B?

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

Does anyone on team A share a birthday with team B?Do two databases share an ID?A card drawn in both of two batchesTwo raffle groups sharing a ticket numberColliding PIN codes
All questions →