Qm

Do two databases share an ID?

Database A holds 10001000 records, each with a random 66-digit ID (uniform over 10000001000000 values). Database B independently holds another 10001000 records with random IDs from the same range.

What is the probability that at least one ID appears in both databases?

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

Two raffle groups sharing a ticket numberDoes anyone on team A share a birthday with team B?Two key sets colliding in one hash tableA card drawn in both of two batchesYour number sits out a hundred rounds
All questions →