Skip to content

Instantly share code, notes, and snippets.

@dscottie
Created June 16, 2021 08:22
Show Gist options
  • Save dscottie/b221124e33e37ca71672299999b8ea0c to your computer and use it in GitHub Desktop.
Save dscottie/b221124e33e37ca71672299999b8ea0c to your computer and use it in GitHub Desktop.
Coding Task

Coding Interview - The Task

You need to implement the following user story:

As a user, I want to see the trains that fit my travel schedule, So that I can decide what to buy

Spec

  • Create an HTTP endpoint that will take one input: time in ISO 8601 format, e.g. 2011-12-03T10:15:30+01:00
  • The API should return the next 3 trains from the time provided
  • Schedules can be retrieved from the following two endpoints (we need them both):
  • The time zone of the schedule is in UTC
  • The schedule loops around, i.e. if my input is close to midnight, it should include results from after midnight
  • We would like you to not use a database, but store data in memory

Start

Bonus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment