Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Simulate a robot moving strictly right across a grid while handling obstacles and instant position jumps.
Track visited cells to detect infinite loops caused by teleport chains.
Return step count on success, -1 if blocked, or -2 if a cycle occurs.
What This Tests
Array and grid traversal simulation
Constant-time lookups using hash maps
Cycle detection via state tracking
Boundary and edge case management
Common Patterns
Hashing
Graph Traversal
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Report
Report seen similar question in interview
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
python
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected