← Questions
Bridge and torch problem
0
I was asked this
No reports yet. Sign in to say where you were asked it.
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.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
