Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

2 Wires Puzzle
INTERVIEWPUZZLE

2 Wires Puzzle

Learn how to measure a precise time interval using wires that burn at non-uniform rates.

The Puzzle: You have two wires. Each wire takes exactly 60 minutes to burn from one end to the other. However, the wires are non-uniform (one half might burn in 10 minutes and the other in 50 minutes). How can you measure exactly 45 minutes?

1. The Strategy

We need to find a way to make the burn time represent smaller intervals.

Step 1: Measure 30 Minutes

  • Lighting a wire from both ends simultaneously will make it burn out in exactly 60/2=3060/2 = 30 minutes, regardless of its uniformity.
  • Action: Light Wire A at both ends and Wire B at one end.

Step 2: The Final 15 Minutes

  • After 30 minutes, Wire A is gone. Wire B has exactly 30 minutes of burn time remaining.
  • To measure 15 minutes from that remaining 30, we simply light the other end of Wire B.
  • Action: The moment Wire A finishes, light the second end of Wire B.
  • When Wire B finishes, exactly 15 more minutes have passed.

2. Total Time

  • 30 mins (Wire A) + 15 mins (Remainder of Wire B) = 45 minutes.

Interview-Focused Questions

Q: Why doesn’t the non-uniformity matter?

A: Because even if the wire burns faster at one end, the two flames will always meet when the total remaining mass/length equivalent that takes 60 mins to burn is consumed from both directions. The “midpoint” of time is always reached when you light both ends.

Q: Could you measure 15 minutes using only one wire?

A: No. With only one wire and no clock, you can only measure 30 minutes (by lighting both ends). You need the second wire to “start” the 15-minute countdown from a known 30-minute state.

Key Takeaway

This puzzle tests your ability to use parallelism (both ends) to manipulate a time-based resource.

My Private Notes

Notes are auto-saved locally to this device.