20 Great Brainteasers for Engineers

We all like a challenge right? Test yourself with our selection of 20 brainteasers for engineers, can you answer them all?

A lot of tech companies and other employers seem to have a penchant for asking tricky questions for potential candidates to assess how they think. In some cases, there is no right answer per se, it's rather a way of assessing how your brain is wired. We have "scoured" the internet to find some good examples for you to try. Here are 20 brainteasers for engineers for you to have a go at.


1. How many zeros?

First on our list of brainteasers for engineers is a cheeky one from Google.

Brainteaser: How many trailing zeros are in the number 5! (5 factorial)?

Answer: 1 trailing zero

Workings: The factorial of 5 is 120. (5 x 4 x 3 x 2 x 1)

Apparently a favorite during an interview for a systems engineer at Google. This is a prime example of a brainteaser geared towards thinking the right way rather than getting it absolutely correct. If you were to calculate it in your mind through brute force, the interviewer would know that. Google suggests it might be easier to think of how many times a ten would be produced doing the sum, rather than the actual correct answer. Apparently, this would be more impressive. Yeah we know, I thought brainteasers were supposed to be fun.

2. Trail by bikes

A cheeky example of brainteasers for engineers from Adobe here.

Brainteaser: There are 50 bikes with a tank that has the capacity to go 100 km. Using these 50 bikes, what is the maximum distance that you can go?

20 Great Brainteasers for Engineers

[Image Source: Wikimedia Commons]

Answer: 350 km

Workings: You might initially think of just making a simple multiplication of the number of bikes and capacities. But remember each has 100 km capacity and they are all in the same place. You could set all 50 bikes off but they'd all only travel 100 km. Now, one solution would be to move all bikes 50 km. Then empty half the bikes' fuel tanks into the other to fill them up. Keep doing this until you have 1 bike with a full tank to finish the trek. Of course, you'll have the odd bike stranded when dividing odd numbers. This way you'll get the last bike of the 50 to have traveled 350 km in total. Nice.

3. To break a bulb

Brainteaser: You have two light bulbs in a 100-story building. You want to find the floor at which the bulbs will break when dropped. Find the floor using the least number of drops.


This one is from Facebook for the position of a software engineer, though since it's on the net probably not anymore.

Answer: 16

Workings: You will need to start moving up the building in increments of floors for the first bulb. This could be 10 floors at a time, say. Once you find the point where the first bulb breaks, start again in smaller increments from the last previous incremental floor. So, say you went up in 10-floor increments and it breaks at floor 20, moves back to floor ten with the second bulb. Then start dropping in 1-floor increments. This will give you a worst case of 19. But we can improve on this.

Say you tried floor 16 first. Let's say it breaks. Go back to floor one and move up in one-floor increments (floors 1-15). This will give you a worst case of 16 drops, if floor 16 was the breaking point, for the second bulb, in the worst case. You can, of course, extend this principle if it doesn't break at floor 16. You could move to floor 31, 45, 58 etc. for the first bulb etc. Given the use of the same method, you'll always reach a worst case of 16 drops to find the floor.


4. Wasting water

This is a classic one and easily applicable as an example of brainteasers for engineers, let's see if you can figure it out?

Brainteaser: If you had an infinite supply of water and a 5-liter and 3-liter bucket, how would you measure exactly 4 liters? The buckets do not have any intermediate scales.

20 Great Brainteasers for Engineers

[Image Source: Pixabay]

Answer: A lot of wasted water

Workings: You may already know the answer or have worked it out, but we are obliged to give you an answer. Fill the 5-liter bucket first. Then using that bucket fill the 3-liter bucket being careful not to spill any. This leaves 2 liters in the 5-liter bucket. Now chuck away the water in the 3-liter bucket and refill with the remaining contents of the bigger bucket. Once again fill the 5-liter bucket and fill the second 3-liter bucket. This will leave you 4 liters in the 5-liter bucket. Simples!


5. Tournament time


One from Amazon for the position of Manager at Amazon. Though it could be applied as an example of brainteasers for engineers.

Answer: Number of participants - 1

Workings: Again another example of the interviewer not looking for the correct answer. They are looking for how you logically think. It would probably be a good idea to get some more information. You could ask "What team sizes are we talking about here?", for example. Or "Does the number of participants represents the number of teams or individuals?", so on so forth. If we were to ask directly or assume it was a direct elimination tournament then all teams will lose one game except for the champions. Right? So the answer will be the number of teams -1.


6. Socks, socks everywhere!

Brainteaser: There are 20 different socks of two types in a drawer in a completely dark room. What is the minimum number of socks you should grab to ensure you have a matching pair?

20 Great Brainteasers for Engineers

[Image Source: Pixabay]

This example of brainteasers for engineers is (was) apparently for the position of Software Development Engineer in Test at Webtrends.

Answer: 11

Workings: The suggested answer given here is more to show an appreciation of the real world rather than theory, statistics etc. With this in mind, the only way to safely "ensure you have a matching pair" is to pick 11 socks. Those asked by Business Insider said. They say that this is the only foolproof "guaranteed" method of getting a pair in the real world.

7. Parking problems



Another one from Google here, according to gineersnow.

Answer: 1/3

Workings: At first this may seem to be a trick question. With probability, you would be forgiven for thinking this, but often it's not. The fact it's been empty for 9 consecutive days doesn't influence the probability of it's "condition" on the 10th day.

8. Losing your marbles

Brainteaser: Imagine that you have three boxes, one containing two black marbles, one containing two white marbles, and the third, one black marble and one white marble. The boxes were labeled for their contents - BB, WW, BW - but someone has switched the labels so that every box is now incorrectly labeled. You are allowed to take one marble at a time out of any box, without looking inside, and by this process of sampling, you are to determine the contents of all three boxes. What is the smallest number of drawings needed to do this?


A rather long winded one for the position of  Web Technology Intern at Riot Games.

Answer: 1

Workings: Read the question again carefully. The main thing to remember is that the boxes are incorrectly labeled. You can then guarantee the contents of each box with one draw. Let's say you draw a marble from the box labeled BW. You know this is wrong initially, thus it can only by BB or WW, right? If you draw a white marble you know this box must be WW. That leaves two more unknown boxes. The box labeled BB cannot be BB as the labels are wrong. This must, therefore, be BW. Continue with this logic and you can ascertain the correct label for the last one. "Bada bing", cool right?


9. The toss of a coin

Brainteaser: You toss two coins. If you get heads with the first coin, you stop. If you get tails, you toss it again. The second coin is tossed regardless. What is the ratio of heads to tails?

20 Great Brainteasers for Engineers

[Image Source: Pixabay]

Answer: 1 to 1

Workings: Another probability one here from Amazon. You would expect the odds of heads or tails to be 50/50 for any tossed coin. You would then expect to toss the first coin at least twice. This should, by rights, give you a ratio of 1 to 1. The second coin is continuously tossed and it should also have a ratio of 1 to 1. Hence the ratio of the two must, therefore, also be 1 to 1.

10. Plant your flag


This example of brainteasers for engineers is from Cisco from a Software Engineer there.

Answer: Put them in corners dummy

Workings: Yup, you probably go this one off the bat. Plant them in the corners and by virtue, they are touching two walls each. They stated that "I wanted to pierce two walls with a pole horizontally too. They said it was an innovative solution." Alrighty.

11. Weighing things up


This example of brainteasers for engineers is brought to you by Business Insider whilst talking to a software engineer at D. E. Shaw and Company.

Answer: 2

Workings: Theoretically you should be able to do this in two weighings, so long as its a two-pan balance. Firstly, take two pairs of three balls and weigh them first. If they balance, you know the "odd" ball is in the last three balls. From that group take two balls and weigh them against each other. Again if they balance it the last one remaining. If however, the first six balls don't balance grab the set that is lighter or heavier (depending on criteria). In this case, repeat the second step above.

12. Throw it overboard

Brainteaser: You're in a boat and you throw out a suitcase. Does the water level increase?

Another one from Microsoft here, according to Business Insider.

20 Great Brainteasers for Engineers

[Image Source: Pixabay]

Answer: Nope

Workings: Water is already being displaced, if you like, by its contributing weight and density to the submerged part of the boat's hull. So by throwing it overboard, its weight/density will not alter things. If it's denser than water it will sink and displace its total volume, and if it's lighter it will displace the portion of its volume dictated by its weight/density. In either case, there will be no change compared to its existing effect on the displacement of the boat prior to being unceremoniously evicted.

13. Buring ropes

Brainteaser: You have 2 pieces of rope, each of which burns from one end to the other in 30 minutes (no matter which end is lit). If different pieces touch, the flame will transfer from one to the other. You cannot assume any rope properties that were not stated. Given only 1 match, can you time 45 minutes?

20 Great Brainteasers for Engineers

[Image Source: Pixabay]

This cheeky entry on our list brainteasers for engineers comes from an ASIC Verification engineer at Zoran.

Answer: Place one of the ropes at the midpoint between the other and light. Either one rope in a circle or forming a T.

Workings: Depending on the accuracy you are after either solution will work. You could form the first rope into a circle with both ends touching. Then place the other rope, straight, more or less, 180 degrees directly opposite the touching ends. Then light the circular rope touching ends. You could alternatively form a T with one of the ropes bisecting the other at its exact midpoint and light the end of the "vertical" rope, or indeed simultaneously light both ends of the "horizontal" one. In both cases, you get 30 minutes/2 for the circular rope or "horizontal" rope plus 30 minutes for the other rope to give you a total of 45 minutes.

14. Which switch?

Want some more brainteasers for engineers, here's a fun one.


This one comes from a Software engineer at Raytheon.

Answer: 2 switch flicks and a portion of time you can't get back :)

Workings: Light bulbs convert electricity into light and heat right? So, it doesn't matter which switches you turn on or what order. Try one and wait 5-10 minutes. This should be enough time to make them "hot" if correct. 5-10 minutes should be enough time. If it's not that one the light will be off and cold right?. Click the second one, it doesn't matter which so long as it's not the first one. Again wait another 5-10 minutes. Ok, we are assuming the bulb doesn't lose all of its "heat" within this time limit.


Can You Pass the Test Thomas Edison Gave to His Potential Employees?

Now go and check. If the light is on, great you know it's the second one. It could be off and hot, in this case, it is the first one. If it's off and cold (assuming it won't lose its "heat" in the time that's passed) it's the last un-flicked one. Or you could trace the wiring, whatever.

 15. Bittersweet

Brainteaser: You have 1,000 bottles of juice. One contains poison and tastes bitter. How do you find it in the smallest number of sips?

20 Great Brainteasers for Engineers

[Image Source: Pixabay]

Answer: 10

Workings: Another one from Microsoft here, apparently. The answer is similar to some of the others on the list, but is about juice so it's different ok? Take a small sample from 500 of the bottles and take a sip. If it tastes bitter it's one of those if not it's the other 500. Then take samples from 250 of the 500 that tasted bitter and keep halving until you find the exact bottle. Easy peasy.

16. Reading in the dark

Bored yet? Shame on you here are some more brainteasers for engineers.

Brainteaser: One night, Aunt Judy was reading a book in the living room. Uncle Jim turned off the light, leaving the room completely dark. Aunt Judy continued to read. How is this possible?

Answer: Aunt Judy is blind and reading in Braille

Workings: A rather simpler one here but fun. We are not told whether Aunt Judy is reading a conventional book, intentionally. Obviously, if she is blind it matters not to her whether the light is on or off. Though we might further question Uncle Jim's motives. It must be night time is he going to bed? Shouldn't he be helping her? Of course in our current tablet age, she could also be reading off Kindle. Either way, Uncle Jim needs to reflect on his life :)

17. Farmer challenge

Brainteaser: A farmer challenges an engineer, a physicist, and a mathematician to fence off the largest amount of area using the least amount of fence. The engineer made his fence in a circle and said it was the most efficient. The physicist made a long line and said that the length was infinite. Then he said that fencing half of the earth was the best. The mathematician laughed at the others and with his design, beat the others. What did he do?

20 Great Brainteasers for Engineers

[Image Source: Pixabay]

 Answer: The mathematician trolls the other two.

Workings: A fun example of brainteasers for engineers here from TheBrainTeasers, made us chuckle at least. As we know the engineer built a nice circular fence and claimed it was efficient. The physicist decided to make a long line fence of infinite length. He claimed that half the earth should be fenced off for best results. Ok so what about the mathematician? Well, this cheeky chappy decided to build a fence around himself. He then claimed he was the outside of the fence. Nice.

18. Sing us a song

Brainteaser: A man is sitting in a pub feeling rather poor. He sees the man next to him pull a wad of $50 notes out of his wallet. He turns to the rich man and says to him, "I have an amazing talent: I know almost every song that has ever existed." The rich man laughs.

The poor man says, "I am willing to bet you all the money you have in your wallet that I can sing a genuine song with a lady's name of your choice in it." The rich man laughs again and says, "OK, how about my daughter's name, Joanna Armstrong-Miller?"


Answer: Happy Birthday to you

Workings: Well not much to add here, pretty self-explanatory.

19. When life gives you lemons

Brainteaser: A bloke in a restaurant decides to challenge a waiter. He asks him to bring a glass, plate, water, a match and a lemon wedge. He then proceeds to pour enough water onto the plate to cover it.

"If you, good sir, can get the water into the glass from the plate without touching or moving it, you'll get $100", he challenges the waiter. "You can use all of the items here".

Shortly after the waiter walks away with the cash. What did he do?

20 Great Brainteasers for Engineers

[Image Source: Pixabay]

Answer: Create a vacuum in the glass.

Working: Another example of brainteasers for engineers, this one comes from TheBrainTeasers. Perhaps technically more of a demonstration of vacuums than a brainteaser, you could actually try this at home. The answer is to put the match in the lemon slice so it stands vertically on the plate. Then light it and put the glass on it. As the match consumes the oxygen in the glass it will suck the surrounding water into the glass. Hey, presto.

20. Holding water

Finally, we reach the end of our brainteasers for engineers. Still with us? Bravo.

Brainteaser: This object has holes in its top and bottom. It also has holes on its sides and bottom, not only that it is riddled with holes in the middle. Despite this, it can still hold water. What is it?

Answer: A sponge obviously

Workings: A classic one and we don't think we need to explain this any further.

So there you go, a selection of some interview brainteasers for engineers and classic riddles. Could you answer them all? Good for you. Do you have any favorites you'd like to share?


Stay on top of the latest engineering news

Just enter your email and we’ll take care of the rest: