Sock Drawer Matching Riddle
Minimum socks for matching color pair is an easy quant interview question on Brain Teasers.
This brain teaser describes a simple sock-drawer scenario with several colors available in unequal quantities, and asks how many items you must draw blindly to be absolutely sure you have a matching pair. It is an easy-level puzzle that often appears in introductory brain teaser collections or as a warm-up in interviews. The focus is not on handling large numbers or complex probability, but on reasoning about worst-case outcomes when selecting from multiple categories without replacement.
The puzzle leans heavily on the Pigeonhole Principle and on thinking carefully about adversarial or worst-case draws rather than average behavior. A strong answer shows the candidate can abstract away from the specific story and recognize the underlying structure: a finite set of categories, repeated random selections, and a guarantee of duplication. Interviewers watch for clarity in distinguishing certainty from likelihood, a clean explanation of why the bound is minimal, and the ability to generalize the reasoning to similar "matching" or "guarantee" problems.
What it tests
Whenever you must guarantee a repeated outcome among a set of categories, the Pigeonhole Principle governs the minimum required selections. The principle states that if you have more objects than containers (or categories), at least one container must hold more than one object. In this context, each 'container' is a color, and each 'object' is a sock drawn. The logic is that after filling every category once (drawing one of each color), the next draw must necessarily repeat a category, ensuring a match. This principle holds regardless of the number of items in each category, as long as you do not exhaust any category entirely.
Practise this question with written feedback, or hear it in a spoken mock interview.
Get started free