Optimal Strategy for the "Call 50" Number Game
Winning strategy for the number game is a medium quant interview question on Algorithms.
This question describes a two-player counting game where each move advances a shared number toward a fixed target. At each turn, a player chooses the next integer subject to a bounded step size, and the player who lands exactly on the target wins. The candidate must decide whether it is advantageous to move first or second and then specify a concrete strategy that guarantees victory against any opponent play, assuming optimal play on both sides. This style of game commonly appears in quant trading and tech algorithm interviews because it tests whether the candidate can detect and exploit hidden structure in a simple, adversarial process.
Solving it well relies on recognizing and formalizing "safe" or invariant positions and then using backward reasoning from the final winning state. It leans on ideas from combinatorial game theory, modular reasoning, and simple dynamic programming logic, though it can be solved without formal machinery. An interviewer is looking for the ability to generalize from small examples, identify patterns, prove to oneself that the strategy is airtight, and communicate the reasoning clearly rather than just guessing or relying on trial and error.
What it tests
This problem is governed by the concept of invariant positions in sequential games with bounded moves. The core idea is that, given a fixed increment range, there exist certain 'safe' numbers—called winning positions—that, if occupied on your turn, allow you to force a win regardless of the opponent's choices. These positions are spaced at intervals equal to one more than the maximum allowed increment, because no matter what the opponent does, you can always return to the next winning position on your next turn. The pattern holds because the bounded move size creates a predictable structure: by always responding so that the sum of both players' moves in a round equals a fixed total, you maintain control. This is a form of backward induction, where you identify the terminal position (the win) and work backward by subtracting the maximum increment plus one each time to find all critical positions.
Practise this question with written feedback, or hear it in a spoken mock interview.
Get started free