Qm
BrainteasersJane StreetCitadel

Where to stand in the birthday line

A theatre offers a free ticket to the first person in the queue whose birthday is the same as that of someone standing ahead of them. You may choose where to stand, and everyone's birthday is independent and uniform over 365 days.

Which position in the queue maximises your chance of winning the ticket? Explain the trade-off.

Show a hint

To win at position n you need two things: the n minus 1 people ahead of you must all have different birthdays (otherwise someone ahead of you has already won), and your birthday must match one of theirs. Write the product and see where it peaks.

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

Fifty red, fifty blue, two jars, one blind drawHow many people before someone shares your birthday?Twenty-five horses, five lanes, the top twoFrom an hour to half an hourTying your shoelace on the moving walkway
All questions →