The fifth user is first to repeat a code
Users are given codes one at a time, each a uniform random -digit code from to (one of codes).
What is the probability that the fifth user is the first to receive a code that a previous user already has? (The first four are all distinct, and the fifth matches one of them.)
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
The first shared birthday arrives on person tenThe twentieth PIN is the first duplicateA die's first repeated face on the third rollThe eighth card is the first repeatFirst one's red, will all three be?
All questions →