← ALL NOTES
Array

874. Walking Robot Simulation

A robot starts at (0,0) facing north; commands are −2 (turn left), −1 (turn right), or k>0 (walk k steps). Obstacles block movement — hitting one stops the current command but the robot reads on.…

Loading…