Weigh 12 Balls to Find the Odd One
Finding the odd ball with a scale is a medium quant interview question on Brain Teasers.
This classic brain teaser uses a set of visually identical balls and a balance scale to find one defective ball whose weight differs from the rest, without knowing in advance whether it is heavier or lighter. The constraint on the number of weighings forces the candidate to think in terms of optimal information extraction rather than trial and error. Variants of this style of puzzle appear in interviews that value structured reasoning and the ability to plan multi-step strategies under strict resource limits.
Conceptually, the problem leans on decision trees, information counting, and symmetry. A strong answer shows that the candidate can translate the physical setup into abstract "states of the world" and design weighings so that every possible outcome sequence points to exactly one state. Interviewers watch for systematic case organization, use of invariants, and the ability to backtrack and refine a weighing plan when an initial scheme fails. Clear notation, careful bookkeeping of possibilities, and an understanding of how to exploit the balance's three-way outcome are key signals of mastery.
What it tests
The fundamental structure of this problem class is information theory: each weighing on a balance scale with three possible outcomes (left heavier, right heavier, or balanced) provides a fixed amount of information—specifically, it can distinguish among three possibilities per weighing. Therefore, with $k$ weighings, you can distinguish among $3^k$ different cases. When the odd item could be either heavier or lighter, each ball represents two cases (heavier or lighter), so the total number of cases is $2n$ for $n$ balls. The challenge is to design weighings so that each possible sequence of outcomes maps uniquely to a specific ball and whether it is heavier or lighter. This principle holds because the balance scale's ternary output matches the branching structure of a decision tree with three branches at each node, and the goal is to cover all $2n$ cases within the $3^k$ leaves available.
Practise this question with written feedback, or hear it in a spoken mock interview.
Get started free