Software Engineer Intern Interview Questions

9,771 software engineer intern interview questions shared by candidates

In this problem, four people need to cross a river at night, but they have only one torch, and at most two people can cross at a time. The torch is required for any crossing, meaning someone must always bring it back if others are still waiting. Each person takes a different amount of time to cross the river: Person A takes 1 minute, Person B takes 2 minutes, Person C takes 5 minutes, and Person D takes 10 minutes. When two people cross together, they must go at the pace of the slower person. The challenge is to figure out how all four people can get across the river in 17 minutes or less.
avatar

Software Developer Intern

Interviewed at SOTI

3.1
Jul 19, 2025

In this problem, four people need to cross a river at night, but they have only one torch, and at most two people can cross at a time. The torch is required for any crossing, meaning someone must always bring it back if others are still waiting. Each person takes a different amount of time to cross the river: Person A takes 1 minute, Person B takes 2 minutes, Person C takes 5 minutes, and Person D takes 10 minutes. When two people cross together, they must go at the pace of the slower person. The challenge is to figure out how all four people can get across the river in 17 minutes or less.

Viewing 7721 - 7730 interview questions

Glassdoor has 9,771 interview questions and reports from Software engineer intern interviews. Prepare for your interview. Get hired. Love your job.