Can you solve this interview puzzle asked at big companies like Nagarro and Amazon?
Puzzle:
How would you measure 45 minutes using two identical wires, each of which takes exactly 1 hour to burn, and you have matchsticks?
Take some time to pause and think!
Here’s the Solution:
Step 1: Light the first wire from both ends at the same time.
- This wire will burn completely in 30 minutes since burning it from both ends halves the time.
Step 2: Simultaneously, light the second wire from one end.
Step 3: When the first wire burns out (after 30 minutes), immediately light the other end of the second wire.
- Now, the second wire is burning from both ends, which means it will burn out in 15 minutes.
Step 4: Add the time:
- 30 minutes (from the first wire) + 15 minutes (from the second wire) = 45 minutes.
Puzzle solved! 🎉