Optimal River Crossing Strategy
Minimum time for four people to cross is a medium quant interview question on Brain Teasers.
This river crossing brain teaser asks the candidate to design an optimal sequence of moves under tight constraints: only two travelers at a time, a single shared resource needed for every crossing, and different crossing speeds for each person. The scenario forces you to weigh local decisions (who goes next) against the global objective (minimizing total completion time). It is a classic example of constrained scheduling with shared resources, where naive "greedy" choices can lead to suboptimal outcomes, and where a better plan emerges from thinking several steps ahead and comparing alternative strategies.
The puzzle leans on ideas from bottleneck analysis, combinatorial search, and basic optimization. It rewards the ability to enumerate candidate strategies without getting lost in exhaustive casework, and to reason quantitatively about trade-offs: when it is better to use fast agents for repeated trips versus bundling slow agents together. Interviewers watch for structured thinking, clear justification of each step, and an appreciation of how small local decisions propagate into the total time, rather than guesswork or ad hoc trial and error.
What it tests
This class of problems is governed by the principle of bottleneck minimization in sequential processes with asymmetric costs. When multiple agents with different speeds must share a limited resource (like a torch or a bridge), the total time is dictated not just by individual speeds, but by how the slowest agents are paired and how the fastest agents can be leveraged to reduce idle or wasted time. The key is to structure the crossings so that the slowest crossings happen as infrequently as possible, and the fastest agents are used for necessary but less costly return trips. This is because the costliest moves (those involving the slowest agents) dominate the total time, so their impact must be minimized by clever sequencing. The underlying structure is always about distributing the required crossings so that the slowest elements are paired together, and the fastest elements handle the extra trips.
Practise this question with written feedback, or hear it in a spoken mock interview.
Get started free