Search
⌘K
Get Premium
Leetcode 657. Robot Return to Origin
Determine whether a sequence of moves ('U','D','L','R') returns a robot to the origin by checking that the net horizontal and vertical displacements cancel out (i.e., counts of 'L' vs 'R' and 'U' vs 'D' are equal).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.