Problem: A horse rider went a mile in 5 minutes with the wind and returned in 7 minutes against the wind. How fast could he ride a mile if there was no wind? Solution: Most of us will proceed like that if a rider goes a mile in 2 minutes with the wind, and returns … Read More →
Supersonic bee and trains
Problem: Two trains enter a tunnel 200 miles long, traveling at 100 mph at the same time from opposite directions. As soon as they enter the tunnel a supersonic bee flying at 1000 mph starts from one train and heads toward the other one. As soon as it reaches the other one it turns around … Read More →
Squares on a chess board?
Problem: How many squares are on a chess board? If you thought the answer is 64, think again! How about all the squares that are formed by combining smaller squares on the chess board (2×2, 3×3, 4×4 squares and so on)? A 1×1 square can be placed on the chess board in 8 horizontal and 8 … Read More →
Generate integer from 1-8 with equal probability
Problem: Write a method to generate a random number between 1 and 8, given a method that generates a random number between 1 and 3. The distribution between each of the numbers must be uniform. Solution: Let’s think of this like a decision tree. Each rand3() will be a decision. If we somehow generate integers … Read More →
8 Balls Puzzle
Problem: You have 8 balls. One of them is defective and weighs less than others. You have a balance to measure balls against each other. In 2 weighing, how do you find the defective one? Solution: Defective ball is light Make three Groups G1 – 3 balls G2 – 3 balls G3 – 2 balls First weight- … Read More →
Sand Timer Puzzle
This Puzzle is one of the most commonly asked interview puzzle. Problem: You have two sand timers with you. One can measure 7 minutes and the other sand timer can measure 11 minutes. This means that it takes 7 minutes for the sand timer to completely empty the sand from one portion to the other. … Read More →
2 Eggs 100 Floors Puzzle
Problem: You are given 2 eggs. You have access to a 100-storey building. Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100 th floor.Both eggs are identical. You need to figure out the highest floor of a … Read More →
IIT Students and Hats Puzzle
Puzzle: The riddle is Nine IIT students were sitting in a classroom. Their professor wanted them to test. Next day the professor told all of his 9 students that he has 9 hats, The hats either red or black color. He also added that he has at least one hat with red color and the … Read More →
10 identical bottles of pills
This is a very popular brain teaser with many companies. Problem : We have 10 identical bottles of identical pills (each bottle contain hundred of pills). Out of 10 bottles 9 have 1 gram of pills but 1 bottle has pills of weight of 1.1 gram. Given a measurement scale, how would you find the … Read More →
What’s going on ?