Bridge and torch night crossing
Asked at Optiver, IMC
Four people need to cross a rickety bridge at night. They have one torch, and the bridge holds at most two people at a time. Anyone crossing must carry the torch (there is no throwing it back, someone must walk it back).
Their individual crossing times are 1, 2, 5, and 10 minutes. When two people cross together, they move at the slower person's pace.
What is the minimum total time for all four to get across, and what schedule achieves it?
Show a hint
The obvious "fastest person shuttles everyone" plan is not optimal. Think about pairing the two slowest people so their times overlap.