Mars Rover / Robot Controller (CLI)
Asked at Shopify · Coding Questions · Difficulty: Medium · Last asked Jun 29, 2026
Build a command-line app that controls a robot/rover on a 2D grid: it starts at a position facing a direction and accepts commands to turn left/right and move forward, reporting its position and heading. The single most common Shopify pair-programming prompt; difficulty comes from the follow-ups and the design discussion, not the base problem.
Loading the problem…