Fin Maverick
Foundations VocabularyAccounting & ReportingEconomics & MacroQuant Methods & ProgrammingBusiness & Company AnalysisCorporate Finance & ValuationBehavioural Finance
Banking & Market InfrastructureFixed Income & RatesDerivatives & Structured ProductsPublic EquitiesTransactions & DealsPortfolio ConstructionFunds & AMCs
Private Markets & AlternativesRisk, Treasury & ControlAI & Digital FinanceStochastic Calculus & PricingWealth & Personal FinanceIndian Markets & RegulationProfessional Practice
CalculatorComparison
Frameworks
Explore Bootcamps
Equity ResearchPortfolio ManagementMutual Fund MasteryInvestment Banking Analyst
Private Equity AnalystQuant & Hedge Fund AnalystBreaking Into VCFinancial Analyst Program
Risk Management ProgramPrivate Wealth ManagementDebt Capital MarketsDerivatives Foundation
Explore Free Courses

Equity Research6

Writing an Investment ThesisBuilding a Discounted Cash FlowReading an Annual Report FastReading a Sector Before a CompanySpotting Quality of Earnings Red FlagsBuilding a Revenue Forecast From Drivers

Portfolio Management3

Rebalancing: When, Why and What It CostsStrategic and Tactical Asset AllocationMeasuring Risk in a Portfolio

Mutual Fund Mastery3

Comparing Funds Without Being FooledHow a NAV Is Struck and Which Day You GetReading a Fund Factsheet Properly

Derivatives Unlocked4

Hedging a Real ExposureThe Greeks, PracticallyFutures, the Basis and What Moves ItReading an Option Payoff

AI For Finance2

Retrieval and Grounding for FinanceDocument Extraction in Finance

Breaking Into Quants4

Backtesting a StrategyHypothesis TestingCleaning Financial DataRegression for Finance

Breaking Into VC3

Sizing a MarketReading a Term Sheet as a FounderHow a Venture Round Actually Works

Financial Analyst Program4

Common Size and Trend AnalysisReading a Cash Flow StatementRatio Analysis That Says SomethingBuilding a Working Capital Schedule

Risk Management Program2

Credit Exposure and How It Is ReducedValue at Risk and What It Hides

Investment Banking Analyst3

Precedent Transactions and Why They DifferReading a Term Sheet StructurallyBuilding a Comparable Companies Table

Private Wealth Management3

Tax Aware Portfolio DecisionsBuilding a Client Risk ProfileGoal Based Planning Arithmetic

Debt Capital Markets3

Analysing an Issuer's CreditDuration and What It Does Not Tell YouBond Pricing and Yield Mechanics

Private Equity Analyst2

Fund Waterfalls and CarryThe LBO in Structure

Hedge Funds Analyst2

Short Selling MechanicsLong Short Mechanics
QuarksCourses
Explore Interview Preparation
Investment BankingEquity ResearchVenture CapitalistPrivate EquityHedge Funds
QuantFinancial AnalysisPrivate Wealth ManagementDebt Capital MarketsRisk Management
Derivatives FoundationPortfolio ManagementMutual Fund Mastery
PartnershipsShowdown
Log inSign up
Interview tracksAll
1Investment Banking
Question bankPuzzlesCase studies
2Equity Research
Question bankPuzzlesCase studies
3Venture Capital
Question bankPuzzlesCase studies
4Private Equity
Question bankPuzzlesCase studies
5Hedge Funds
Question bankPuzzlesCase studies
6Quant
Question bankPuzzlesCase studies
7Financial Analysis
Question bankPuzzlesCase studies
8Private Wealth Management
Question bankPuzzlesCase studies
9Debt Capital Markets
Question bankPuzzlesCase studies
10Risk Management
Question bankPuzzlesCase studies
11Derivatives Foundation
Question bankPuzzlesCase studies
12Portfolio Management
Question bankPuzzlesCase studies
13Mutual Fund Mastery
Question bankPuzzlesCase studies

Quant puzzles, solved step by step

Puzzles
100
Traced to a firm
71
Topics
12
Hard
30
Topic
All topicsLogic and algorithmic reasoning10Conditional probability and Bayes7Counting and combinatorics8Continuous and geometric probability9Correlation, regression and linear algebra9Market making, betting and sizing9Expected value and optimal stopping9Statistics and estimation9Pricing, options and index maths7Games and strategic reasoning8Markov chains and random walks7Mental maths and number sense8
Level
AnyWarm upCoreHard
Source
AnyReported at a firmStandard
Showing 1–3 of 3 · filtered from 100Clear filters
  1. 023You flip a fair coin until the pattern HTH appears. What is the expected number of flips? Why is it larger than the expected wait for HTT, when each pattern has the same probability of 1/8 at any given position?Markov chains and random walksHardQuant tradingQuant research

    Try it first

    Expected flips to see HTH?

    Show the worked solution

    10 flips for HTH, against 8 for HTT. Track how much of the pattern you currently hold: nothing, H, or HT. For HTH, a tail after HT wrecks everything and you restart from nothing. For HTT, a head after HT breaks the pattern, but that head is itself a fresh start, so you keep an H. Solving the three expected-wait equations gives 10 and 8.

    Why do equal probabilities give unequal waits?

    Think of a combination lock where a wrong digit sometimes resets you to zero and sometimes lets you keep part of your progress. Two combinations can be equally likely to be dialled at random yet take different times to reach. Each three-flip window is HTH or HTT with the same 1/8 chance, but the windows overlap, and HTH occurrences tend to arrive in clusters, such as HTHTH, which spaces out the first appearance. The waiting time depends on where a near miss leaves you.

    Where a failure sends you back decides the waitWaiting for HTH: 10 flips on averagestartE = 10HE = 8HTE = 6HTHHTHTHT from HT: back to startWaiting for HTT: 8 flips on averagestartE = 8HE = 6HTE = 4HTTHTTTHH from HT: back to HHTH10flipsHTT8flips
    Waiting for HTH, a tail from state HT sends you back to the start and the average wait is 10 flips; waiting for HTT, a head from HT leaves you holding an H and the average wait is only 8.

    How do you set up the equations?

    Let E0, E1 and E2 be the expected remaining flips when you hold nothing, H and HT. Each flip costs one and moves you to the next state with probability one half each way, so each state's wait is 1 plus the average of the two states it can move to. For HTH: E0 = 1 + (E1 + E0)/2, E1 = 1 + (E1 + E2)/2, E2 = 1 + (0 + E0)/2. Solving gives E2 = 6, E1 = 8, E0 = 10. For HTT only the last equation changes, to E2 = 1 + (0 + E1)/2, and the answers become 4, 6 and 8.

    The relationship
    EHTH=23+21=10EHTT=23=8E_{HTH} = 2^3 + 2^1 = 10 \qquad E_{HTT} = 2^3 = 8
    2^3from the whole pattern matching itself
    2^1from HTH's last flip matching its first: the pattern overlaps itself
    What it says in wordsFor a fair coin, add 2 to the power k for every length k at which the pattern's start equals its end.

    Is there a shortcut an interviewer will accept?

    Yes, the overlap rule, which comes from a fair-bet argument known as the ABRACADABRA methodA martingale argument in which gamblers arriving each flip bet on the pattern, used to compute expected waiting times for patterns.. For a fair coin, the expected wait is the sum of 2 to the k over every k where the first k flips of the pattern equal the last k. HTH matches itself at length 3 and at length 1, the single H, giving 8 + 2 = 10. HTT matches only at length 3, giving 8. HHH matches at 1, 2 and 3, giving 14. Derive the states first, then offer the rule as the check.

    Where candidates lose it

    The trap is answering 8 for every three-flip pattern, reasoning that each has probability 1/8 per window. That confuses frequency with first arrival: over a long run both patterns appear equally often, but HTH comes in overlapping clumps.

    The second loss is getting the fall-back wrong in the state diagram. For HTT, after HT a head is not a return to nothing; it is a new H. Drawing that arrow to the start gives 10 for both and hides the whole point.

    What the interviewer asks next

    • What is the expected wait for HHH?
    • Two players race, one waiting for HTH and one for HTT on the same flips. Who is more likely to win?
    • With a biased coin that shows heads 60% of the time, what is the expected wait for HTH?
  2. 030We play chess repeatedly. Each game is drawn with probability 1/2; of the decisive games I win 2/3 and you win 1/3. The match ends when one of us wins three games in a row, and a draw breaks any streak. What is the probability I win the match?Markov chains and random walksHardOld Mission CapitalChicago · 2018

    Try it first

    Roughly what is my chance of winning the match?

    Show the worked solution

    86/99, about 86.9%. Track only the current streak: none, me on 1 or 2, you on 1 or 2. Each game I win with probability 1/3, you win with 1/6, and a draw, 1/2, resets the streak. Write my chance of taking the match from each state in terms of the others, solve the five equations, and the start state comes out at 86/99.

    What is the state, and why is the running score not it?

    A door lock that opens after three correct codes in a row does not care how many wrong codes came before the last mistake. The only thing that matters for the rest of this match is the current streak, so the states are: no streak, my streak of 1 or 2, and your streak of 1 or 2. Games won earlier, draws played, games elapsed: all irrelevant once the streak is known. That is the Markov propertyThe future depends on the past only through the present state., and spotting it turns an infinite tree of game sequences into five numbers. Per game, I win with probability 1/2 x 2/3 = 1/3, you win with 1/2 x 1/3 = 1/6, and the rest are draws.

    Five live states, two endings: one equation per live state1/31/61/31/31/61/61/61/31/6 from I on 21/3 from You on 2Startmy chance 86/99I on 129/33I on 210/11You on 128/33You on 28/11I winthe matchYou winthe matchEvery draw (probability 1/2) from any state sends the match back to Start.Grey figure in each box: my chance of winning the match from that state.
    The match has five live states and two endings; solving one equation per state gives my chance of winning as 86/99 from the start, rising to 10/11 when I am on a streak of two and falling to 8/11 when you are.

    How do the equations go, and how do you solve them quickly?

    Let x be my chance from the start, a1 and a2 from my streaks, b1 and b2 from yours. Every equation reads the same way: play one more game, three things can happen. A draw always returns to the start, a win for me always moves to a1 or one step up, and a win for you always moves to b1 or one step up. From a2 my next win ends the match in my favour; from b2 your next win ends it against me.

    The relationship
    x=13a1+16b1+12xa1=13a2+16b1+12xa2=13+16b1+12xb1=13a1+16b2+12xb2=13a1+12x\begin{aligned} x &= \tfrac13 a_1 + \tfrac16 b_1 + \tfrac12 x & a_1 &= \tfrac13 a_2 + \tfrac16 b_1 + \tfrac12 x & a_2 &= \tfrac13 + \tfrac16 b_1 + \tfrac12 x \\ b_1 &= \tfrac13 a_1 + \tfrac16 b_2 + \tfrac12 x & b_2 &= \tfrac13 a_1 + \tfrac12 x \end{aligned}
    xmy chance of winning the match from a fresh start
    a1, a2my chance when I have won the last one or two games
    b1, b2my chance when you have won the last one or two games
    What it says in wordsEach state's value is the average of where the next game can send the match, weighted by the chance of each result.

    Solve by substituting: b2 is in terms of a1 and x, which gives b1 in the same terms; feed that into a2 and a1, and the start equation leaves one unknown. The answers: x = 86/99, a1 = 29/33, a2 = 10/11, b1 = 28/33, b2 = 8/11. Check the ordering: the further I am ahead, the higher the value, and every value sits between 0 and 1. Your chance is 13/99. A quick cross-check: three wins in a row is (1/3) cubed for me and (1/6) cubed for you, a ratio of 8 to 1, which would suggest about 89%; landing within two points of that rough race is a sign no term was dropped.

    Where candidates lose it

    Candidates often forget that a draw resets both streaks, or they let a draw keep a streak alive. The question says draws break any streak, which is why every state has a path back to the start, and dropping that path changes the answer.

    The other loss is trying to add up sequences of games. The sequences never end; the states are five. Name the states first, write one line per state, and the problem becomes algebra.

    What the interviewer asks next

    • What if a draw does not break a streak?
    • What is the expected number of games the match lasts?
    • What if the match needs only two wins in a row?

    Asked at Old Mission Capital, Prop Trading, Chicago, 2018 (Wall Street Oasis): You and I play chess. 1/2 games end in draws and in the other half I win with 2/3 probability

  3. 095A knight starts in a corner of an empty chessboard and moves at random, choosing uniformly among its legal moves at every turn. What is the expected number of moves until it first returns to the starting corner?Markov chains and random walksHardQuant researchQuant trading

    Try it first

    Pick the expected return time.

    Show the worked solution

    168 moves. A random walk that picks uniformly among a square's moves spends time at each square in proportion to its number of moves, its degree. The degrees on a chessboard sum to 336 and a corner has degree 2, so the knight is in that corner 2/336 of the time. The expected return time is the reciprocal, 336/2 = 168.

    Why is the time spent on a square proportional to its number of moves?

    Think of a town where every road is two-way and a lost tourist picks a road at random at each junction. Big junctions get more visits simply because more roads lead into them. For a random walk on a network of two-way links, the long-run share of time at a point is its number of links divided by the total, because that split sends exactly as much traffic along every link in each direction. Check it on one knight move from square u to square v: the flow is (d_u/336) x (1/d_u) = 1/336, and the flow back is the same, so nothing piles up anywhere.

    Time on a square is proportional to its moves: return time = 336 / 22344443234666643468888644688886446888864468888643466664323444432start: the corner, 2 movesMoves per squaresquarestotal2x 483x 8244x 20806x 16968x 16128total degree336share of time in the corner = 2 / 336expected return time = 1 / share= 336 / 2 = 168 moves
    The knight's move counts range from 2 in the corners to 8 in the centre and total 336, so the walk spends 2/336 of its time in the starting corner and returns to it every 168 moves on average.
    The relationship
    πv=dv∑udu,E[return time to v]=1πv=∑ududv=3362=168\pi_v = \frac{d_v}{\sum_u d_u}, \qquad \mathbb{E}[\text{return time to } v] = \frac{1}{\pi_v} = \frac{\sum_u d_u}{d_v} = \frac{336}{2} = 168
    d_vthe number of legal knight moves from square v
    pi_vthe long-run share of time the walk spends at v
    sum of d_uthe total of the move counts over all 64 squares, 336
    What it says in wordsThe share of time at a square is its move count over the total, and the average gap between visits is one over that share.

    How do you get 336 quickly and check it?

    Tally the move counts by symmetry, as in the figure: four corners with 2, eight squares with 3, twenty with 4, sixteen with 6 and sixteen with 8. For a check, count the moves themselves: every knight move is a diagonal of a 2 by 3 or 3 by 2 rectangle, there are 84 such rectangles on the board, each holds 2 moves, so there are 168 two-way moves and 336 move ends. The answer, 168, happens to equal the number of moves, a coincidence of the corner having exactly two.

    What are the limits of the trick?

    The rule that return time is one over the long-run share holds for any chain that can reach every state and settles down, which is Kac's lemma. The degree formula for that share needs two-way moves chosen uniformly; if the knight preferred some moves, you would have to solve for the share directly. One more subtlety is worth saying: a knight always changes square colour, so it can only return after an even number of moves, and the chance of being in the corner at a fixed time does not settle down. The average return time is unaffected, and a seeded simulation of 100,000 returns gives 168.0. From a central square with 8 moves the return time is 336/8 = 42.

    Where candidates lose it

    The usual wrong answer is 64, from assuming the knight spends equal time on every square. It does not: squares with more moves are visited more often, and a corner, with only two moves, is one of the rarest.

    The second loss is setting up 64 equations for expected hitting times. That works on paper and fails in an interview. Say the degree rule, count the degrees by symmetry, and check the total with the rectangle count.

    What the interviewer asks next

    • What is the expected return time to a central square such as d4?
    • Answer the same question for a king starting in a corner.
    • Why does the knight always need an even number of moves to come back?
Fin Maverick Free CoursesExplore Free Courses
Fin Maverick BootcampsExplore Bootcamps
Fin Maverick

Finance education that ends in a job, not a certificate that gathers dust. Built for young India.

LEARN
CalculatorsFrameworksComparisonsInterview RoadmapsShowdown
RESOURCES
All CoursesFree CoursesBootcampsInternships
COMPANY
AboutJob openingPartnership
LEGAL
Privacy PolicyTerms & ConditionsContent LicenseReturn & Refund Policy
© 2026 FIN MAVERICK / BUILT FOR INDIA.DO FINANCE, DO NOT JUST READ ABOUT IT.