Simulate a Robot Following Commands on a Grid
You are given a robot on a 2D grid with an initial position and a string of movement commands. Simulate the robot.
- Coordinate system: bottom-left is
(0, 0), right isx+1, up isy+1. - Input i...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
