Search
⌘K

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.

Mid February, 2026

Shopify

Senior

Early February, 2026

Shopify

Manager

Early January, 2026

Shopify

Senior

Your account is free and you can post anonymously if you choose.