LeetCode

Robot Return to Origin

Click here for an explanation.