Leetcode 874. Walking Robot Simulation
Simulate a robot on an infinite grid executing turn commands and unit-step moves, stopping any step that would hit an obstacle and updating its facing direction as instructed. Use fast obstacle lookup (e.g., a hash set) while stepping through commands to track and return the maximum squared Euclidean distance from the origin reached.
Asked at:
Shopify
Apple
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early January, 2026
Shopify
Senior
Early January, 2026
Shopify
Senior
Create a command line app that prompts for commands and moves a rover around a 2D plane. The robot should point in a direction, turn to face different directions, and move in the direction it is facing.
Early January, 2026
Meta
Staff
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.