How long the coin-flip gambler lasts
A gambler starts with $3. On each round she bets $1 on a fair coin flip: heads she gains $1, tails she loses $1. She stops as soon as she is either broke ($0) or has reached her target of $8.
On average, how many rounds does she play before stopping?
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 a drifting walk ever come home?Guaranteed to arrive, yet the average wait is infiniteThe drunk one step from the cliffThe drunkard who wants to climb one step uphillRuin against an infinitely rich casino
All questions β