Brain Teasers · The Gambler's Ruin
Gambler's Ruin Puzzle - Play It on a Fair Coin
Start with $50, bet $1 a flip on a fair coin, stop at $100 or $0. What are the odds of doubling up?
What is the gambler's ruin?
A gambler bets a fixed amount on repeated plays until reaching a target or going broke. It is the simplest random walk with two absorbing barriers.
In a fair game, expected money never changes, and that alone gives the answer: starting at i with stops at 0 and N, the chance of reaching N is i/N.
How it works
Mira starts with $50 and bets $1 a flip on a fair coin until she reaches $100 or $0. The story asks the probability she reaches $100 first. You type your answer and check it. Then you step through the answer and the breakdown.
How scoring works
This teaser checks your answer. Any correct form counts - a fraction, a decimal rounded correctly, a percent, or the number in words. You get two tries before the answer opens. A correct first try earns a ticket; a second try or opening the answer early is recorded but earns nothing. The story teasers share one lifetime unlock for free users.
The key insight
The game is fair and certain to end, so her expected final money equals her start: 100P = 50, and P = 1/2. The game lasts i(N - i) = 2,500 flips on average.
The full step-by-step solution lives at /brain-teasers/gamblers-ruin/solution.
A worked example
With a 49% coin instead, q/p = 51/49 and the chance is (1 - (q/p)^50) / (1 - (q/p)^100), about 12%.
Common mistakes
• Guessing below a half because ruin 'feels' more likely.
• Forgetting the game must end for the fair-game argument to hold.
• Assuming a small edge per bet stays small over a long game.
Why interviews test this
Say 'fair game, so the expected value doesn't change', give i/N, and be ready for the unfair coin. The written solution is at /brain-teasers/gamblers-ruin/solution.
Play The Gambler's Ruin on Outcry
The Gambler's Ruin is free to play on Outcry, in the Brain Teasers section, and every run is timed and scored. Read the guide once, then play The Gambler's Ruin and check your score against the strategy above. The guide book has a written guide for every other game, and the practice hub and mock assessments put the same skills under a real screen's clock.