Bridge and torch problem

0
Remix

People must cross a bridge at night with one flashlight. At most two cross at once, a pair moves at the slower person's speed, and someone has to bring the flashlight back. Given everyone's crossing time, return the minimum total time. Sort the times and compare the two ways of moving the two slowest people across at each step.

NvidiaTechnical phone screenLast asked Jan 2026
No answer yet. Write the first one; the best answer gets endorsed.