Brain Teaser
Why Brain Teasers in Interviews?
Brain teasers are a staple of technical and consulting interviews. They are not about getting the “right” answer — interviewers use them to evaluate how you think under pressure. Specifically, they assess:
- Problem solving — Can you break a complex problem into manageable parts?
- Critical thinking — Can you evaluate options and reason logically?
- Analytical skills — Can you estimate, calculate, and work with data?
- Creativity — Do you approach problems from unconventional angles?
- Composure under pressure — Can you stay calm and structured when put on the spot?
The interviewer cares far more about your thought process than your final answer. A well-reasoned wrong answer beats a lucky right one every time.
How to Approach Brain Teasers
Follow this three-step framework for any brain teaser:
1. Pause and think. Do not blurt out the first thing that comes to mind. Take 10–15 seconds to process the question. This shows composure and discipline.
2. Ask clarifying questions. Make sure you fully understand what is being asked. Interviewers often leave details ambiguous on purpose to see if you will seek clarity.
3. Think out loud. Walk through your reasoning step by step. Verbalize your assumptions, estimates, and logic. The interviewer wants to hear how you think, not just what you think.
Estimation Problems (Fermi Questions)
How many gas stations are in the United States?
This is a classic Fermi estimation question. The key is to build your estimate from reasonable assumptions:
- The U.S. population is roughly 330 million.
- Assume about 1 car per 2 people, so roughly 165 million cars.
- The average car fills up about once per week.
- A gas station can serve roughly 1,000–1,500 fill-ups per week (multiple pumps, long hours).
- 165 million fill-ups ÷ 1,250 per station ≈ ~130,000 gas stations.
The actual number is around 150,000. Your estimate does not need to be exact — it needs to show logical, structured thinking.
Other variations:
- “How many barbers are there in Chicago?”
- “How many piano tuners are there in New York?”
- “How many golf balls fit inside a Boeing 747?”
The approach is always the same: start with a known number, make reasonable assumptions, and scale up or down.
Logic & Deduction Puzzles
Three Light Bulbs and Three Switches
A windowless room contains three identical light bulbs. Outside the room are three switches, each connected to one bulb. All bulbs are currently off. You may flip the switches as many times as you want, but once you open the door and enter the room, you cannot touch the switches again. How do you determine which switch controls which bulb?
Solution:
- Turn on Switch 1. Leave it on for 5 minutes.
- Turn off Switch 1. Immediately turn on Switch 2.
- Enter the room.
- The bulb that is on → Switch 2 (it is currently receiving power).
- The bulb that is off but warm → Switch 1 (it was on long enough to generate heat).
- The bulb that is off and cold → Switch 3 (it was never turned on).
Key insight: The trick is using heat as a second data point beyond just on/off. This transforms a problem with 3 unknowns and only 1 observable state into a solvable one.
The Two Doors Problem (Guard Riddle)
You stand before two doors. One leads to freedom, the other to doom. Each door has a guard. One guard always tells the truth; the other always lies. You do not know which is which. You can ask one question to one guard. What do you ask?
Solution:
Ask either guard: “If I asked the other guard which door leads to freedom, what would he say?”
Then choose the opposite door.
Why this works:
- If you ask the truth-teller, he will truthfully report the liar’s answer — which is wrong. So you get the wrong door.
- If you ask the liar, he will lie about the truth-teller’s (correct) answer — giving you the wrong door.
- Either way, the answer points to the wrong door. So you pick the other one.
Math & Measurement Puzzles
Measuring Exactly 4 Gallons
You have a 3-gallon bucket, a 5-gallon bucket, and unlimited water. Neither bucket has measurement markings. How do you measure exactly 4 gallons?
Solution 1 (Start with the 3-gallon):
- Fill the 3-gallon bucket. Pour it into the 5-gallon bucket. (5-gal: 3, 3-gal: 0)
- Fill the 3-gallon bucket again. Pour into the 5-gallon until full — only 2 gallons fit. (5-gal: 5, 3-gal: 1)
- Empty the 5-gallon bucket. (5-gal: 0, 3-gal: 1)
- Pour the remaining 1 gallon from the 3-gallon into the 5-gallon. (5-gal: 1, 3-gal: 0)
- Fill the 3-gallon bucket. Pour it into the 5-gallon. (5-gal: 4, 3-gal: 0)
Solution 2 (Start with the 5-gallon):
- Fill the 5-gallon bucket. Pour into the 3-gallon until full. (5-gal: 2, 3-gal: 3)
- Empty the 3-gallon bucket. (5-gal: 2, 3-gal: 0)
- Pour the 2 gallons from the 5-gallon into the 3-gallon. (5-gal: 0, 3-gal: 2)
- Fill the 5-gallon bucket again. Pour into the 3-gallon until full — only 1 gallon fits. (5-gal: 4, 3-gal: 3)
Both solutions end with exactly 4 gallons in the 5-gallon bucket.
The Egg Drop Problem
You have 2 identical eggs and a 100-story building. You need to find the highest floor from which an egg can be dropped without breaking. What is the minimum number of drops needed to guarantee you find the answer?
Solution:
The optimal strategy uses 14 drops. Here is the reasoning:
- Drop the first egg from floor 14. If it breaks, test floors 1–13 one by one with the second egg (13 more drops = 14 total).
- If it survives, drop from floor 27 (14 + 13). If it breaks, test floors 15–26 one by one (12 more drops = 14 total).
- Continue this pattern: 14, 27, 39, 50, 60, 69, 77, 84, 90, 95, 99, 100 — each jump decreases by 1.
Key insight: The formula is: find the smallest n where n + (n-1) + (n-2) + … + 1 ≥ 100. That is n(n+1)/2 ≥ 100, giving n = 14.
Lateral Thinking Questions
Why Are Manhole Covers Round?
A round cover cannot fall through its own opening. A circle has the same diameter in every direction, so no matter how you tilt it, it will not fit through the hole.
A square or rectangular cover can be tilted diagonally and dropped through. The round shape is the only common shape with this safety property.
Bonus reasons: Round covers are easier to roll into position, they do not need to be rotated to align, and round pipes naturally produce round openings.
Trail by Bikes
You have 50 motorcycles, each with a full tank that allows exactly 100 km of travel. How far can you travel using all 50 bikes?
Solution: 350 km
The strategy is to consolidate fuel at checkpoints:
- Start: All 50 bikes ride 50 km (each uses half a tank). At the 50 km mark, 25 bikes transfer their remaining fuel to the other 25 bikes, filling them back up.
- 50 km mark: 25 full bikes continue another 50 km. At the 100 km mark, 12 bikes refuel the remaining 13 (approximately).
- Repeat this halving pattern at each 50 km checkpoint: 50 → 25 → ~13 → ~7 → ~4 → ~2 → 1 bike.
- The last bike has a full tank and travels the final 50 km.
Each consolidation stage covers 50 km, and you can do this 7 times before running out of bikes: 7 × 50 = 350 km.
Tips for Success
- Structure beats speed. A methodical approach always impresses more than a rushed guess.
- Show your work. Even if you are unsure, explaining your reasoning demonstrates the thinking skills interviewers are looking for.
- Practice estimation. Get comfortable making back-of-the-envelope calculations. Practice with everyday questions: How many flights land at your local airport per day? How many words are in a typical novel?
- Stay calm. Brain teasers are meant to be challenging. Taking a moment to think is expected and respected.