9s in 1 to 1000

How many nines between one and thousand is an easy quant interview question on Combinatorics, reported to have been seen at Akuna Capital.

Difficulty Easy Topic Combinatorics Reported at Akuna Capital

MyQuantPartner is not affiliated with, endorsed by, or sponsored by these companies, and all trademarks belong to their respective owners.

This combinatorics question is about counting how often a specific digit appears across a whole range of written numbers, a classic pattern-recognition task in discrete math. It forces you to think in terms of positions in a numeral, not individual values, which is central to many counting and probability questions in quant interviews and quant prep.

It trains your ability to formalize a simple-sounding puzzle into a structured counting framework, to reason about symmetries in digit positions, and to avoid double-counting or omissions. You practice decomposing a range into systematic cases and keeping track of contributions from each, a key habit for fast, accurate interview performance.

This matters for quant interviews because similar logic underpins probability distributions, state spaces, and combinatorial models in trading and risk. Being fluent with this kind of counting under time pressure is a strong signal of quant readiness.

What it tests

Digit-counting problems are governed by the principle that each digit position in a fixed-width number cycles through all possible values equally often as you enumerate all numbers in a range. For $n$-digit numbers, each digit (from $0$ to $9$) appears in each position exactly $10^{n-1}$ times, except for leading zeros if not allowed. This uniformity arises because the counting process is a Cartesian product: for each choice of digits in the other positions, every digit cycles through the full range in the position of interest. The total count for a specific digit is thus the sum over all positions of the number of times it appears in each, adjusted for any restrictions (like leading zeros or range endpoints). This structure lets you break a large counting problem into manageable, position-wise subproblems.

Practise this question with written feedback, or hear it in a spoken mock interview.

Get started free