← Exoduspoint Interview Insights

Exoduspoint·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
May 2026

Summary

Got a puzzle-style question at Exoduspoint for a software engineering role. Just the one problem, classic bridge-and-torch setup, but they wanted a full walkthrough of the reasoning not just the answer.

Questions Asked (1)

Q1

Four people need to cross a narrow bridge at night with one flashlight. Each person has a known crossing time, at most two can cross at once, and the flashlight must be carried back by someone walking. If two cross together they move at the slower person's pace. Given the four times sorted as t1 <= t2 <= t3 <= t4, what sequence of crossings minimizes total time and what is that minimum?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

I knew the puzzle vaguely but blanked on the two-strategy comparison when they pushed me to formalize it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, identify the two candidate strategies: the 'two fastest shuttlers' method and the 'fastest + slowest pair' method. Then, derive the total time for each and determine the condition under which each is optimal. Finally, present the optimal sequence and the minimum time formula.

Pro tip: Emphasize that the optimal strategy depends on the relative values of t1, t2, t3, and t4, and that a single fixed sequence is not always optimal. This shows you understand the problem's nuance and can handle edge cases.

1. Understand the problem constraints

Restate the rules: at most two cross at once, flashlight must be carried, and group speed is the slower person's time. Clarify that the goal is to minimize total time.

2. Identify the two main strategies

Strategy A: Use the two fastest as shuttlers (t1 and t2) to escort the slower ones. Strategy B: Pair the two slowest together and use the fastest to return the flashlight.

3. Compute total time for each strategy

For Strategy A: total = t2 + t1 + t4 + t2 + t2 = t1 + 3*t2 + t4. For Strategy B: total = t2 + t1 + t4 + t3 + t1 = 2*t1 + t2 + t3 + t4. (Note: These are for the standard 4-person case.)

4. Determine the optimal choice

Compare the two totals: Strategy A is better if t1 + 3*t2 + t4 < 2*t1 + t2 + t3 + t4, which simplifies to 2*t2 < t1 + t3. Otherwise, Strategy B is optimal.

5. Present the sequence and minimum time

State the optimal sequence of crossings and returns, and give the minimum total time as the smaller of the two computed totals, or the formula based on the condition.

Key Points to Mention

  • The two candidate strategies: 'two fastest shuttlers' and 'fastest + slowest pair'.
  • The condition for choosing between strategies: 2*t2 < t1 + t3.
  • The total time formulas: t1 + 3*t2 + t4 and 2*t1 + t2 + t3 + t4.
  • The importance of considering all four crossing times and their relative values.
  • The fact that the optimal sequence may involve pairing the two slowest together.
  • The need to verify the solution with a concrete example (e.g., times 1, 2, 5, 10).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.