Analytical Interview Questions
Home C/C++ JAVA Google Microsoft Data structures Puzzles Google
Pages
Resume Tips

 

Question

      There are four people who need to cross a bridge at night. The bridge is only wide enough for two people to cross at once. There is only one flashlight for the entire group. When two people cross, they must cross at the slower member's speed. All four people must cross the bridge in 17 minutes, since the bridge will collapse in exactly that amount of time. Here are the times each member takes to cross the bridge:

Person A: 1 minute

Person B: 2 minutes

Person C: 5 minutes

Person D: 10 minutes

If Person A and C crossed the bridge initially, 5 minutes would elapse, because Person C takes 5 minutes to cross. Then Person A would have to come back to the other side of the bridge, taking another minute, or six minutes total. Now, if Person A and D crossed the bridge next, it would take them 10 minutes, totaling to 16 minutes. If A came back, it would take yet another minute, totally 17. The bridge would collapse with A and B on the wrong side. How can all four people get across the bridge within 17 minutes? Note: there is no trick-answer to this problem. You cannot do tricky stuff like throwing the flashlight etc.

 

Solution

1. A and B cross together. Total Time: 2 Minutes

2. B comes back. Total Time: 4 Minutes

3. C and D cross together. Total Time: 14 Minutes

4. A comes back. Total Time: 15 Minutes

5. A and B cross together. Total Time: 17 Minutes

 

Recommended Materials

 

Keywords: