Socks Puzzle-Puzzle for Interview rounds.


There are 10 black socks and 10 white socks in a drawer. Now you have to go out wearing your shoes.

So how many maximum number of times do you need to remove the sock from the drawer so that you can go out?

You can remove only 1 sock at a time.

You can’t look at the drawer while removing the socks.

Solution: 3

The worst case is when the socks from the first 2 pick do not match. However, in the third pick, since there are only 2 colors, the sock will match one of the socks already with me. 

This is also widely known as the "Pigeon Hole Principle".

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.




Upskilling students for tech placements!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Be an Introvert and Still Succeed at Work

Save Story: Controller’s ‘Call in the Blind’ Saves Pilot

Event Management Services In Vizag

How to unleash the power of corporate innovation

Passion Vs Interests

5 Concrete Actions to Foster an Inclusive and Supportive Work Environment

Want More Revenue? Follow My Bulletproof Template

Last Place Medal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Upskilling students for tech placements!

More from Medium

Sorted Insert for Circular Linked List

Graph Algorithms

Oracle Interview Experience (On-Campus)

Goldman Sachs — SDE