Maximizing Product with Stacked Pennies

Best way to stack 100 pennies is a medium quant interview question on Brain Teasers, reported to have been seen at Jane Street.

Difficulty Medium Topic Brain Teasers Reported at Jane Street

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

This brain teaser is about turning a simple combinatorial setup into an optimization problem, under a discrete constraint. It lives at the intersection of number partitioning and continuous maximization ideas, asking you to reason about how to split a fixed total into parts that jointly maximize a multiplicative payoff. It looks innocent but quickly forces you to connect intuitive experimentation with more formal quantitative thinking.

It trains your sense for asymptotics, optimization under constraints, and how continuous calculus-inspired reasoning can guide discrete decisions. This is core quant prep: translating an informal puzzle into variables, recognizing structure, and exploiting properties like convexity, symmetry, and scaling. It also pushes you to reason carefully about edge cases and remainders, not just the main heuristic.

This matters for quant interviews because it directly reflects how you'll reason about payoff maximization, trade sizing, and risk-reward structuring in real problems. Interviewers use this style of question to see if you can combine intuition, mathematical maturity, and clear explanation. For modern quant interviews and rigorous quant prep, mastering such optimization brain teasers is essential.

What it tests

When maximizing the product of positive numbers with a fixed sum, the product is maximized when the numbers are as close as possible to the mathematical constant $e \approx 2.718$. This is because, for a given sum $S$, dividing it into $n$ equal parts yields a product of $(S/n)^n$, which is maximized when $n = S/e$. Since only integer stack sizes are allowed, the optimal solution is to use stack sizes of 3 and possibly one stack of 2 or 4 if the remainder requires it. The underlying reason is that the exponential function grows faster than linear, so splitting larger numbers into smaller, nearly equal parts increases the product more than keeping them together, due to the convexity of the logarithm function.

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

Get started free