Algorithm · Shopify · Medium
Problem Design a terminal-driven robot simulator that supports multiple robots on a 2D grid. Each robot has a coordinate and a facing direction. You are given a grid of width W and height H. Valid positions obey: 0 <= x < W 0 <= y < H A robot's direction is one of four cardinal values: N, E, S, or W. Read a sequence of commands and execute them in order. Whenever a REPORT command appears, output the current state of the requested robot. Commands Every command occupies a…
Checking your access…