Interview Puzzles

Stack of 'must-know' interview puzzles !

Basketball hoop puzzle!!

You have a basketball hoop and someone says that you can play 1 of 2 games
Game 1: You get one shot to make the hoop
Game 2: You get three shots and you have to make 2 of 3 shots
If p is the probability of making a particular shot, for which values of p should you pick one game or the other?

Country of boys!!!

In a country where people only want boys, every family continues to have children until they have a boy. if they have a girl, they go for another child. if they have a boy, they stop. what is the proportion of boys to girls in the country?

Puzzle 100 Locker

There are one hundred closed lockers in a hallway A man begins by opening all one hundred lockers Next, he closes every second locker Then he goes to every third locker and closes it if it is open or opens it if it is closed (e g , he toggles every third locker) After his one hundredth pass in the hallway, in which he toggles only locker number one hundred, how many lockers are open?

Puzzle

A bunch of men are on an island A genie comes down and gathers everyone together and places a magical hat on some peoples heads (i e , at least one person has a hat) The hat is magical: it can be seen by other people, but not by the wearer of the hat himself To remove the hat, those (and only those who have a hat) must dunk themselves underwater at exactly midnight. If there are n people and c hats, how long does it take the men to remove the hats? The men cannot tell each other (in any way) that they have a hat.
FOLLOW UP:
Prove that your solution is correct.

The Jug Puzzle

You have a five quart jug and a three quart jug, and an unlimited supply of water (but no measuring cups) How would you come up with exactly four quarts of water? NOTE: The jugs are oddly shaped, such that filling up exactly "half" of the jug would be impossible

The Dominos puzzle

There is an 8x8 chess board in which two diagonally opposite corners have been cut off. You are given 31 dominos, and a single domino can cover exactly two squares. Can you use the 31 dominos to cover the entire board? Prove your answer (by providing an example, or showing why is it impossible).

Puzzle

Add arithmetic operators (plus, minus, times, divide) to make the following expression true: 3 1 3 6 = 8 You can use any parentheses you'd like.

Speed, distance & time

In a Road Race, one of the three bikers was doing 15km less than the first and 3km more than the third. He also finished the race 12 minutes after the first and 3 minutes before the third.Can you find out the speed of each biker, the time taken by each biker to finish the race and the length of the course?Assume that there were no stops in the race and also they were driving with constant speeds through out.

Guess the code

There is a safe with a 5 digit number as the key. The 4th digit is 4 greater than the second digit, while the 3rd digit is 3 less than the 2nd digit. The 1st digit is thrice the last digit. There are 3 pairs whose sum is 11.Find the number.

Permutating chess peices

How many ways are there of arranging the sixteen black or white pieces of a standard international chess set on the first two rows of the board?Given that each pawn is identical and each rook, knight and bishop is identical to its pair.

1 2 3 4 5 6