1041. Robot Bounded In Circle
Medium
Input: instructions = "GGLLGG"
Output: true
Explanation: The robot moves from (0,0) to (0,2), turns 180 degrees, and then returns to (0,0).
When repeating these instructions, the robot remains in the circle of radius 2 centered at the origin.Input: instructions = "GG"
Output: false
Explanation: The robot moves north indefinitely.Last updated