there are 4 guys A, B, C, and D.these thre guys are standing on the bank of a river. they have one boat with them, on which maximum of two guys can travel at a time. when A alone moves on the boat, it takes 10 minutes to cross the river. similarly B takes 5 minutes, C takes 2 minutes, and D takes 1 minute. and if two guys travel at a time, it takes maximum of the two times, associated with the two guys.
now the problem is that you have to find out what can be the minimum time , in which they can cross the river.
A riddle asked in a microsoft interview?
C+D cross first 2 mins
D returns for 1 min
A+B cross for 10 mins
C returns for 2 mins
C+D cross for 2 mins
Total 17 minutes
Reply:The first trip is with the 10 minute and 1 minute guy which takes 11 minutes round-trip. Next trip the 5 minute guy and 1 minute guy travel taking 6 minutes round trip. Finally the 2 minute and 1 minute guy go one direction taking 2 minutes.
10+6+2=18 minutes total
Reply:C and D cross the river = 3 minutes
D takes the boat back = 1 minute
D and B cross the river = 6 minutes
D takes the boat back = 1 minute
D and A cross the river = 11 minutes
22 minutes total for A, B, C and D to cross the river.
Reply:Time Taken
10 + 1 + 5 + 1 + 2 = 19 minutes
Reply:They should all just swim. I mean, if it takes as little as one minute to get across, why hassle with the darn boat!
Reply:I'm not sure if this is important, but you say that there are 4 guyz at the beginning, then say that "These three guys are standing on the bank of a river." Either that's a typo, or its a part of the riddle
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment