All guides

Relay coding: how to play well as a team

Relay coding changes what makes a team strong. Only one player can type at a time, and the editor moves on when the timer runs out. The fastest typist does not win on their own: the team that plans, talks and hands off well usually does.

Plan before the first line of code

Use the first minute to read the problems together. Agree which problem to start with, usually the easiest, and roughly how to solve it. A shared plan means the next player does not have to start from scratch when the turn changes.

Use the time when it is not your turn

  • Read ahead: work out the next problem so you are ready when your turn starts.
  • Watch the code live and spot mistakes early, such as a wrong loop bound or a missing edge case.
  • Think about test inputs: what happens with the smallest input, or the largest?

Hand off cleanly

The last 30 seconds of a turn matter. Leave the code in a state the next person can pick up: finish the line you are on, and avoid half-written blocks that do not compile. A short comment like a plan for the remaining steps can save the next player a minute of reading.

Talk in team chat, but in words

Team chat is for ideas and hand-off notes, for example "sort first, then use two pointers" or "check the case when N is 1". On RelayTrixCode, code cannot be sent in chat, so describe the idea and let the person at the keyboard write it.

Run often, submit with care

Run checks your code against the example tests and costs nothing, so use it whenever you change something. Submit is judged on hidden tests and decides your score. Your best submission on each problem counts, so a failed attempt never lowers your score, but every submit takes time away from the next problem.

Know when to move on

Partial credit means passing some hidden tests still earns points. If your team is stuck on one problem, take the partial points and move to the next one. You can come back later if there is time.

Browse the problem library or create a room.