VOOZH about

URL: https://www.geeksforgeeks.org/aptitude/puzzle-pair-of-socks/

⇱ Puzzle | Pair of Socks - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Puzzle | Pair of Socks

Last Updated : 17 Oct, 2025

There are 10 black socks and 10 white socks in a drawer. All socks of the same color are identical, and you cannot look into the drawer while picking socks.

What is the minimum number of socks you must draw to guarantee a matching pair (two socks of the same color)?

👁 sock_problem_initial_setup

Check if you were right - full answer with solution below.

Case 1:

If the first two socks are of the same color (both black or both white), then you already have a matching pair.

👁 sock_problem_initial_setup

Total draws = 2

Case 2:

If the first two socks are of different colors (one black, one white), then when you pick the third sock, it will be either black or white.
In either case, you’ll now have two socks of the same color.

👁 sock_problem_initial_setup2

Total draws = 3

Final Answer:

The minimum number of socks we need to draw to ensure a matching pair (two socks of the same color) is 3.

Comment
Article Tags:
Article Tags: