## Interview Question

• 0

Country: United States

Comment hidden because of low score. Click to expand.
7
of 7 vote

Known question. Burn the first rope from both the ends and the second rope from only one end. When the first rope completely burns away, 30 minutes would have elapsed and the second rope can now burn for 30 more minutes.

Now start burning the second rope from the second end and start boiling the egg. Stop boiling the egg when the second rope completely burns as it would now measure 15 mins.

Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
2

@Mitra,

I think Murali solution is correct because he is waiting till first rope burnt completely means 30 min passed so second rope will take next 30 min to burn even though it has even density.

Comment hidden because of low score. Click to expand.
0

Thanks. I discussed it with a friend over dinner. Got it now :)

Comment hidden because of low score. Click to expand.
2
of 2 vote

1. Start burning the 1st rope from both end and 2nd rope from one end
2. When first rope finished burning (which take exactly 30 minutes to burn from both end) torch the other end of 2nd rope to burn, which takes exactly 15 minutes to burn

Comment hidden because of low score. Click to expand.
1
of 1 vote

Assuming that both ropes are identical...
Burn the 1st rope from both ends and lay the 2nd one next to it.
-> Cut the 2nd rope in 2 pieces were the fire meets on the 1st rope (not necessarily the midpoint because of the uneven distribution)
-> Burn both of the 2 pieces of the 2nd rope from both ends and start boiling the egg
-> The egg is done when all rope pieces are burnt

Comment hidden because of low score. Click to expand.
0

Great!

Comment hidden because of low score. Click to expand.
0
of 0 vote
Comment hidden because of low score. Click to expand.
0
of 0 vote

count 60 for fifteen time , and take out the boiled egg :)

Comment hidden because of low score. Click to expand.
0
of 2 vote

floding the rope equally twice, start burning one side

Comment hidden because of low score. Click to expand.
0

I am hating you for this reply.. The question mentions that the rope is uneven, so if you fold it, it won't burn for exact 15 minutes!!
To make things clear for you if a rope has 4 portion buring for 8 12 20 20 minutes, two time folded rope will burn for 15 minutes.

Comment hidden because of low score. Click to expand.
0

I am hating you for your reply. The question clearly mentions that the ropes are uneven, if you fold it and burn the whole rope may not burn in 15 minutes. To make it clear say the time distribution across the 4 parts of rope is 8 12 20 20, then if you fold and burn it will burn for 20 minutes!

Comment hidden because of low score. Click to expand.
-1
of 1 vote

Does this logic make any sense?

Measure density of both ropes. Cut second rope up in a way with density of first rope in mind, and attach second rope to first rope in a way that density is now evenly distributed.

Burn one side of rope and start boiling egg. Once 1/8th of rope is burnt, stop boiling egg.

Note: 1/8th of rope to burn because new rope will burn for 2hrs total, given that each burns for 1 hour each.

Comment hidden because of low score. Click to expand.
-1
of 1 vote

Another solution is to cut one rope into two pieces. Start to burn both pieces from both ends and start to cook the egg. When the last piece is burned 15 mins have passed.

Then you have one rope left for yet another egg :-)

Comment hidden because of low score. Click to expand.
0

i appretiate the logic but

no guarrenty to take xact 15 min for whole rope to burn, due to uneven density.

Comment hidden because of low score. Click to expand.
-1
of 1 vote

Ok you are right!

But you can still do it with just one rope:

1. Cut it into two pieces and light both ends of each piece.
2. When only one of the pieces is left, cut it again and immediately light the cut ends.
3. Repeat 2. until nothing is left..

Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

### Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

### Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.