Two key sets colliding in one hash table
Set A has keys and set B has keys, all hashed into the same table of 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
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- 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 →