Technical Interview

Added Recently
Data Structures
Google & Microsoft
C/C++ Questions
Java Interview Questions
Quantitative Problems
Featured Articles
Amazon Interview Question
Compaq Interview Question
Technical Interview
Interview Process
Introduction Questions
Object Oriented
Google Pages
Fundamental Questions
Resume Tips
Contact Us
Submit Question/Answer

You are in the dark, and on the floor there are six shoes of three colors, and a heap of twenty-four socks, black and brown. How many socks and shoes must you take into the light to be certain that you have a matching pair of socks and a matching pair of shoes?

Three socks and four shoes would guarantee that you would have a matching pair of each. Since there are only two colors of socks, it doesn't matter how many are in the heap, as long as you take at least three, you are certain to have two of the same. As for the shoes, you must pick four, because selecting only three could result in one shoe in each of the three colors!