Fundamentals/Simulation Coding Problems: Introduction and Strategies
← PrevNext →
Simulate a robot on an infinite grid starting at (0,0) facing north. Given a string of commands ("G" go forward 1, "L" turn left 90, "R" turn right 90), return the final [x, y] position.