PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Exoduspoint

Find minimal time for four people crossing

Last updated: Mar 29, 2026

Quick Overview

This question evaluates algorithmic problem-solving and combinatorial optimization skills, focusing on reasoning about constrained pairing, state-space search, and minimizing total time under movement constraints.

  • medium
  • Exoduspoint
  • Coding & Algorithms
  • Software Engineer

Find minimal time for four people crossing

Company: Exoduspoint

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

Assume there are four people who need to cross a narrow bridge at night using a single flashlight. - Each person \(i\) requires a different, known amount of time \(t_i\) to cross the bridge when walking alone. - At most two people can be on the bridge at the same time. - Whenever one or two people cross, they **must** carry the flashlight with them. - If two people cross together, the time for that crossing is the **maximum** of their two individual times (they must move at the speed of the slower person). - The flashlight cannot be thrown or sent by any means other than being carried by a person walking back across the bridge. You are given the four crossing times \(t_1, t_2, t_3, t_4\) (positive integers). You may assume, without loss of generality, that they are sorted so that \[ t_1 \le t_2 \le t_3 \le t_4. \] **Tasks:** 1. Determine a strategy (sequence of crossings and returns) that minimizes the **total** time required for all four people to end up on the other side of the bridge with the flashlight. 2. Express the minimal total time in terms of \(t_1, t_2, t_3, t_4\) and clearly describe the order in which people cross and who returns with the flashlight. Do **not** write code; just provide the final minimal total time and explain your reasoning and crossing sequence step by step.

Quick Answer: This question evaluates algorithmic problem-solving and combinatorial optimization skills, focusing on reasoning about constrained pairing, state-space search, and minimizing total time under movement constraints.

Exoduspoint logo
Exoduspoint
Dec 8, 2025, 7:49 PM
Software Engineer
Technical Screen
Coding & Algorithms
3
0

Assume there are four people who need to cross a narrow bridge at night using a single flashlight.

  • Each person iii requires a different, known amount of time tit_iti​ to cross the bridge when walking alone.
  • At most two people can be on the bridge at the same time.
  • Whenever one or two people cross, they must carry the flashlight with them.
  • If two people cross together, the time for that crossing is the maximum of their two individual times (they must move at the speed of the slower person).
  • The flashlight cannot be thrown or sent by any means other than being carried by a person walking back across the bridge.

You are given the four crossing times t1,t2,t3,t4t_1, t_2, t_3, t_4t1​,t2​,t3​,t4​ (positive integers). You may assume, without loss of generality, that they are sorted so that

t1≤t2≤t3≤t4.t_1 \le t_2 \le t_3 \le t_4.t1​≤t2​≤t3​≤t4​.

Tasks:

  1. Determine a strategy (sequence of crossings and returns) that minimizes the total time required for all four people to end up on the other side of the bridge with the flashlight.
  2. Express the minimal total time in terms of t1,t2,t3,t4t_1, t_2, t_3, t_4t1​,t2​,t3​,t4​ and clearly describe the order in which people cross and who returns with the flashlight.

Do not write code; just provide the final minimal total time and explain your reasoning and crossing sequence step by step.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Exoduspoint•More Software Engineer•Exoduspoint Software Engineer•Exoduspoint Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.