Fundamentals
/
Simulation Coding Problems: Introduction and Strategies
⏸
00:00
↻
← Prev
Next →
▶
Question
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.
▶
Understand
▶
Approach
▶
My Code
▶
Reference Solution
Compare
11