FastPrepRoute Length From Two Cyclists
Problems/Route Length From Two Cyclists

Route Length From Two Cyclists

Jane Street logoJane Street● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in one Jane Street trading desk operations report from London, posted in 2026. It describes a first round of maths and statistics questions and a later coding round, and separately recalls a cycling word problem with two riders whose answer is a distance. It gives neither the figures nor which facts were known.

We chose the setup: both riders leave the same point together on the same road at constant speeds, and the slower one arrives a given number of minutes later. That setup, speeds in whole kilometres per hour, the gap in whole minutes, the numbers in all three examples, the limits and the tolerance are ours.

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

Two cyclists leave point A at the same moment and ride the same road to point B, each at a constant speed. One rides at fastSpeed kilometres per hour and the other at slowSpeed kilometres per hour.

The slower cyclist reaches B exactly gapMinutes minutes after the faster one. Return the distance from A to B in kilometres.

Answers within 10-6 of the correct value are accepted.

Function

routeDistance(fastSpeed: int, slowSpeed: int, gapMinutes: int) → double

Examples

Example 1

fastSpeed = 15slowSpeed = 10gapMinutes = 60return = 30.0

The route is 30 kilometres. At 15 kilometres per hour it takes 2 hours, and at 10 kilometres per hour it takes 3 hours, which is 60 minutes longer.

Example 2

fastSpeed = 20slowSpeed = 12gapMinutes = 40return = 20.0

The route is 20 kilometres. The faster rider needs 60 minutes and the slower one needs 100 minutes, a gap of 40 minutes.

Example 3

fastSpeed = 7slowSpeed = 3gapMinutes = 25return = 2.1875

The route is 2.1875 kilometres. The faster rider needs 18.75 minutes and the slower one needs 43.75 minutes, a gap of 25 minutes. The answer does not have to be a whole number.

Constraints

  • 1 <= slowSpeed < fastSpeed <= 100
  • 1 <= gapMinutes <= 1440

More Jane Street Phone Screen questions

  • Maximum-Scoring Consecutive Tree LevelsPHONE SCREEN · Seen Nov 2026
  • Tree Selection and VisibilityPHONE SCREEN · Seen Nov 2026
  • Load/Store Arithmetic InterpreterPHONE SCREEN · Seen Oct 2026
  • Instrument Stack Language JumpsPHONE SCREEN · Seen Oct 2026
  • Run a Stack Language InterpreterPHONE SCREEN · Seen Oct 2026
  • Positive-Integer Expression EvaluationPHONE SCREEN · Seen Oct 2026
  • Add Two Integers Given as StringsPHONE SCREEN · Seen Sep 2026
  • Angle Between Clock HandsPHONE SCREEN · Seen Jul 2026
  • Sort TradesPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026
  • Painted Cube: Count and RollPHONE SCREEN · Seen Jul 2026

Similar questions at other companies

  • Sqrt(x)LinkedIn · PHONE SCREENLinkedIn interview questions
  • Pressure Chamber Linear InterpolationSpaceX · PHONE SCREENSpaceX interview questions
  • When to Accept a Doubled BetSusquehanna International Group (SIG) · PHONE SCREENSusquehanna International Group (SIG) interview questions
  • Integer Square Root with Error ChecksBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Square Root FunctionCitadel · PHONE SCREENCitadel interview questions
  • Random Pick with Weight Using Recorded DrawsGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • Convex Function MinimizationUber · PHONE SCREENUber interview questions
  • Square Root with Newton IterationGoldman Sachs · PHONE SCREENGoldman Sachs interview questions
  • Minimum of a Convex FunctionRippling · PHONE SCREENRippling interview questions
  • Minimum Full Glasses for an Exact Water VolumeMarshall Wace · PHONE SCREENMarshall Wace interview questions

Interview reports that mention this question

  • Jane Street TDOE UK Coding Round: 15 Experiences (Part 3 of 10)
  • Jane Street TDOE Interviews: 165 Experiences (Part 1 of 10)

Jane Street interview experiences

  • Jane Street TDO UK and Hong Kong: 22 Experiences (Part 10 of 10)
  • Jane Street TDOE US Final Round: 11 Experiences (Part 5 of 10)
  • Jane Street TDO Phone Math Round: 26 Experiences (Part 9 of 10)
  • Jane Street TDOE UK Phone Screen: 15 Experiences (Part 4 of 10)
All Jane Street interview questionsSee Jane Street hiring insights
Saved
class Solution {
    public double routeDistance(int fastSpeed, int slowSpeed, int gapMinutes) {
      // Write your code here.
    }
}
Checking account…