Sobes.tech
Senior

The sock problem: there are heaps of socks of three colors (red, white, black), you pick one by one — how many attempts are guaranteed to get a pair of the same color?

sobes.tech AI

Answer from AI

To guarantee getting a pair of socks of the same color, you need to understand how many socks can be taken without getting a pair. We have three colors: red, white, black.

The maximum without a pair is when we have one sock of each color, that is 3 socks.

The next sock (the 4th) will definitely match the color of one of the already taken socks, forming a pair.

Answer: 4 attempts.

The sock problem: there are heaps of socks of three… - sobes.tech