Two ropes, each burns in an hour. Measure 45 minutes.
The classic burning-rope interview puzzle: two ropes that each take an hour to burn, but burn unevenly, and a single lighter. How do you measure exactly 45 minutes? The trick is realising what stays fixed when the burn rate does not.
You are given two ropes and a lighter. Each rope has one strange property: lit from one end, it takes exactly 60 minutes to burn from that end to the other. Nothing else about the burn is uniform. The first half of a rope might smoulder for 55 minutes and the second half flash away in 5. The two ropes need not behave the same way as each other.
You have no watch, no phone, no marks on the ropes, and no way to fold or cut them accurately. The only events you can observe are: a flame reaching the end of a rope, and two flames meeting.
Measure exactly 45 minutes.
Before opening any hints, be precise about what is actually guaranteed. The statement promises one thing only: end-to-end burn time is 60 minutes. It deliberately does not promise that the midpoint of the rope is reached at the 30-minute mark. Most wrong answers die on that distinction.
Interviewers used this question at trading firms and big tech for years because it punishes exactly one habit: assuming a convenient property (uniform burn rate) that the problem never granted. If your first instinct was "burn half a rope", the puzzle is working as intended.
Stuck? Open hints one at a time
Each hint gives away one more layer. Stop the moment something clicks.
Hint 1 a nudge
Cutting or marking the rope is useless because burn rate varies. So the only quantities you can trust are whole-rope times. What operations can you perform on a rope besides lighting one end?
Hint 2 the key move
Light a rope from both ends at once. The two flames must meet somewhere, and when they meet, every fibre of the rope has burned. Ask yourself: how much total burn time did the two flames consume between them, and how long did that take on the clock?
Hint 3 nearly the answer
Both ends lit means the rope is fully consumed in exactly 30 minutes, regardless of how unevenly it burns. That gives you a 30-minute timer. You need 15 more minutes, and you still have a second rope, which by then has been burning from one end for 30 minutes. What is left of it, and how do you burn that remainder in 15 minutes?
The solution
Reveal the full solution
At time zero, light rope A at both ends and rope B at one end.
The two flames on rope A consume it from both directions. Whenever they meet, the whole rope has burned. Here is the counting argument that makes this airtight: in any interval of length t, the two flames together consume 2t minutes' worth of rope, because each flame alone consumes rope at the rate of one burn-minute per clock-minute. Rope A contains exactly 60 burn-minutes of material. So the flames meet when 2t = 60, that is, at t = 30, no matter how the burn-minutes are distributed along the rope's length. Unevenness moves the meeting point, never the meeting time.
When rope A dies at the 30-minute mark, rope B has been burning from one end for 30 minutes, so exactly 30 burn-minutes of it remain. At that instant, light rope B's other end. The same doubling argument applies to the remainder: two flames, 30 burn-minutes of material, consumed at 2 burn-minutes per clock-minute, so the remainder is gone in 15 minutes.
Rope B finishes at 30 + 15 = 45 minutes. Done.
What this puzzle is really testing
The rope is a resource with a conserved total (60 burn-minutes) and an untrusted distribution. The solution ignores the distribution entirely and works only with the conserved quantity. That is an invariant argument, the same move that proves the converging two-pointer technique never skips the answer, and the same discipline behind reasoning about two-pointer algorithms generally: two agents advancing toward each other, and a claim about their combined progress rather than either one's position.
The follow-up interviewers actually ask
Which durations are measurable with two ropes? Each rope end is a binary choice of when to ignite, and each ignition can be triggered by a previous rope-death event. Working through the event tree gives 15, 30, 45, 60, 90, and 120 minutes as natural targets, with 7.5 reachable if you allow relighting a remainder from both ends again. If you enjoy mapping out state spaces like that, the state design template shows the same enumeration habit applied to dynamic programming.