← 返回 google 的题目列表Robot Transformation
类型:online_judge
Given a starting position of a robot and a sequence of movement instructions, determine if the robot returns to the starting position after executing all instructions. The instructions consist of four characters: 'U' for up, 'D' for down, 'L' for left, and 'R' for right.
Example
Input
"UD"
Output
true