You are trying to cook an egg for exactly fifteen minutes, but instead of a timer, you are given two ropes which burn for exactly 1 hour each. The ropes, however, are of uneven densities – i e , half the rope length-wise might take only two minutes to burn. How can you cook the egg for exactly fifteen minutes?

You can measure 1 hour by burning any rope from one end, now if we burn the rope from both the ends, it will take half of the time, i.e. 30 minutes, thus we can measure 30 minutes by burning the rope from two ends.

But we need to measure 15 minutes, we can measure 15 minutes if we burn a rope from two ends, which generally take 30 minutes in burning from one end. In order to achieve that we can use second rope given to us.

**Steps to measure 15 minutes**

- Light Rope #1 from both ends.
- At the same time light Rope #2 from one end.
- When Rope #1 burns fully, it will be 30 minutes and Rope #2 will take 30 more minutes to burn, light the other end of Rope #2 at this time, thus it will take 15 minutes to burn.
- Start cooking your egg at the same point.
- Stop cooking when Rope #2 burns fully.