FastPrepWhen Did the Canoe Leave?
Problems/When Did the Canoe Leave?

When Did the Canoe Leave?

Susquehanna International Group (SIG) logoSusquehanna International Group (SIG)● MediumINTERNOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: A 2026 report on SIG's one-hour online test for quant research and systematic trading interns includes a river trip puzzle. Two paddlers spend some hours against the current and then more hours with it. On the second day the pair paddle a known distance back to where they began, reaching it at a known clock time. With the current's speed given, you work out when they set off that day. The report's case uses 3 and 4 hours, 48 miles, a 3 mph current and an 8:30 arrival.

The report gives only that case. We chose these. All numbers are inputs. The travel time goes to the closest whole minute, and an exact half goes up. The clock is a 24-hour clock written H:MM that wraps past midnight. The answer is IMPOSSIBLE when the paddlers would not be faster than the current. The interview case is the first example.

Our version is about 85% the same as the reported question.

Two friends paddle a canoe on a river whose current flows downstream at currentMph miles per hour. They always paddle at the same speed v in still water, so they move at v - currentMph going upstream and v + currentMph going downstream.

  • On day 1 they paddle upstream for upstreamHours hours, then downstream for downstreamHours hours.
  • On day 2 they paddle returnMiles miles upstream and arrive exactly back at the point where day 1 began, at arrivalHour:arrivalMinute on a 24-hour clock.

Return the time they left on day 2 as a string "H:MM": the hour without a leading zero (0 to 23) and the minutes as two digits. Round the day 2 travel time to the nearest whole minute, with exactly half a minute rounding up. If the trip takes them back past midnight, keep counting backward on the clock (for example, 1 hour before 0:30 is 23:30).

If no speed v makes them faster than the current, return "IMPOSSIBLE".

Function

canoeDepartureTime(upstreamHours: int, downstreamHours: int, returnMiles: int, currentMph: int, arrivalHour: int, arrivalMinute: int) → String

Examples

Example 1

upstreamHours = 3downstreamHours = 4returnMiles = 48currentMph = 3arrivalHour = 8arrivalMinute = 30return = "6:30"

This is the interview trip. Day 1 ends 4(v + 3) - 3(v - 3) = v + 21 miles below the start, and that must be 48, so v = 27.

Going back upstream at 27 - 3 = 24 mph, 48 miles take 2 hours. Arriving at 8:30 means leaving at 6:30.

Example 2

upstreamHours = 3downstreamHours = 4returnMiles = 24currentMph = 3arrivalHour = 8arrivalMinute = 30return = "IMPOSSIBLE"

Now v + 21 = 24, so v = 3, the same as the current. Going upstream they would not move at all, so the answer is "IMPOSSIBLE".

Example 3

upstreamHours = 1downstreamHours = 2returnMiles = 30currentMph = 1arrivalHour = 0arrivalMinute = 15return = "23:06"

Day 1 ends 2(v + 1) - (v - 1) = v + 3 miles below the start, so v = 27 and they go upstream at 26 mph.

30 miles take 30 / 26 hours, about 69.23 minutes, which rounds to 69. One hour and nine minutes before 0:15 is 23:06 on the clock.

Constraints

  • 1 <= upstreamHours < downstreamHours <= 100
  • 1 <= returnMiles <= 10^6
  • 0 <= currentMph <= 100
  • 0 <= arrivalHour <= 23
  • 0 <= arrivalMinute <= 59

More Susquehanna International Group (SIG) Online Assessment questions

  • Catch Fish with Reusable BaitsOA · Seen Nov 2026
  • Bold Play to Reach a GoalOA · Seen Nov 2026
  • Cats, Truth and Who Has MoreOA · Seen Nov 2026
  • Counting Cows by Their LegsOA · Seen Nov 2026
  • Enough Muffins for the LineOA · Seen Nov 2026
  • Expected Consecutive Pairs Among Chosen NumbersOA · Seen Nov 2026
  • Four-by-Four Boundary GridOA · Seen Nov 2026
  • Frog Paths Without Long RunsOA · Seen Nov 2026
  • Higher Roll, or Lose the SumOA · Seen Nov 2026
  • Is a Popular Story Fake?OA · Seen Nov 2026

Similar questions at other companies

  • Count Prime Values in SubtreesVisa · OAVisa interview questions
  • Minimum Rounds to Complete All TasksInfosys · OAInfosys interview questions
  • Server Upgrade PlanningWells Fargo · OAWells Fargo interview questions
  • Capping Portfolio WeightsCapstone Investment Advisors · OA
  • Gaussian Naive Bayes Classifier (Machine Learning OA)Pinterest · OAPinterest interview questions
  • Count Subarrays with a Perfect-Square ProductMicrosoft · OAMicrosoft interview questions
  • Repeated Mirror XORMathWorks · OAMathWorks interview questions
  • Count Lucky TicketsThe D.E. Shaw Group · OAThe D.E. Shaw Group interview questions
  • Stacked Item and Category DiscountsPalantir · OAPalantir interview questions
  • Task Scheduler with CooldownGoDaddy · OA

Susquehanna International Group (SIG) interview experiences

  • SIG Quant Researcher Experienced Hire Interviews: 11 Experiences
  • SIG Quant Research Intern Interviews: 60 Experiences
  • SIG Quant Researcher New Grad Interviews: 49 Experiences
  • SIG Quant Researcher Intern Interviews: 1 Experience
  • SIG Quant Second-Round Tech Screen: 1 Experience
All Susquehanna International Group (SIG) interview questionsSee Susquehanna International Group (SIG) hiring insights
Saved
class Solution {
    public String canoeDepartureTime(int upstreamHours, int downstreamHours, int returnMiles, int currentMph, int arrivalHour, int arrivalMinute) {
        // Write your code here.
    }
}
Checking account…