Minimum Socks to Guarantee a Matching Pair

Minimum socks for a matching pair is an easy quant interview question on Brain Teasers.

Difficulty Easy Topic Brain Teasers

This brain teaser describes a simple drawer of socks in different colors and asks how many you must pull out, without looking, to be certain of ending up with at least one matching pair. It is an accessible example of worst-case reasoning under uncertainty, where you must plan for the unluckiest sequence of draws rather than the most likely one. Versions of this question, and its many generalizations, are common in school competitions, casual interviews, and introductory puzzle collections because the setting is familiar and the logic can be followed without any probability formulas.

The underlying ideas come from the pigeonhole principle and careful counting arguments. An interviewer using this style of question is checking whether you naturally think in terms of "guarantees" versus "expected outcomes," and whether you can articulate the worst-case logic cleanly. They are also looking for clarity about what is and is not being assumed, the ability to generalize the reasoning beyond the specific numbers, and comfort translating an everyday story into a more abstract combinatorial argument.

What it tests

This problem class is governed by the pigeonhole principle, which states that if you have more objects than categories (or 'holes'), at least one category must contain more than one object. In matching problems involving indistinguishable groups (like colors of socks), the 'holes' are the different categories (colors), and the 'pigeons' are the items being selected. The principle holds because once every category has one object, any additional object must repeat a category, ensuring a match. This logic applies regardless of the specific numbers or types of items, as long as the categories are mutually exclusive and collectively exhaustive. The power of this principle is that it guarantees a minimum outcome (a match) even under the worst-case scenario.

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

Get started free