Quant, Math & Computer Science Puzzles for Interview Preparation & Brain Teasing
A collection of ~225 Puzzles with Solutions (classified by difficulty and topic)

Jan 29, 2012

Lazy Walking Strategy Puzzle

Source: Quantnet Interview Questions

Problem: You are standing on the middle of a East-West street. A row of closed doors in front of you, and you have a key on hand which can only open one specific door. Compose a strategy so that X/N is least under the worst situation. X is the distance you covered when arriving at the correct door. N is the distance between the door and the original point.


Jan 19, 2012

Number Board Puzzle: Sum of Colours

Source: Asked to me by Anuj Jain (EE IITB 2010 Graduate, MFE Student at Baruch College NY)

Problem:

You have a 8x8 square board with numbers in each cell.
12345678
910111213141516
1718192021222324
2526272829303132
3334353637383940
4142434445464748
4950515253545556
5758596061626364


Each number is given a colour (red or white) such that each row and each column has exactly the same number of red number and white numbers (i.e. four). Prove that the sum of 32 red numbers on the board is equal to the sum of the other 32 white numbers on the board.

Cheers!

Update (21 Jan 2012):
Solution: Posted by Piyush Sao (EE IITM Alumnus, Georgia Tech Grad Student) in comments!


Jan 11, 2012

Pile Puzzle


Problem:
You have 55 matches arranged in some number of piles of different sizes. You now do the following operation: pick one match from each pile, and form a new pile. You repeat this ad infinitum. What is the steady state? Is it unique?

Answer is intuitive :) Cheers!

Update (15th Feb 2012):
Clarification:
Assume steady state exists and try to solve the problem.
A much difficult version: Prove that steady state always exists.

Solution:

Solution posted by Avradeep Bhowmik (aletterdoesnotblush), Sumanth Puram (IITM Alumnus, Engineer at Netapp), Mayur Agrawal (Agmay, IIT KGP Alumnus, PhD Student at Purdue University) in comments!

The difficult version posed by Nishant Totla (CSE IITB Senior Undergraduate) and solved by Gaurav Sinha (chera, IITK 1996 Graduate, Indian Revenue Service). Thanks a ton!

Jan 4, 2012

Digit Permutation Puzzle

Source: Taken from Thomer's Puzzle Website (http://thomer.com/riddles/)

Problem:
You have a number that consists of 6 different digits. This number multiplied by 2, 3, 4, 5, and 6 yields, in all cases, a new 6-digit number, which, in all cases, is a permutation of the original 6 different digits. What's the number?