874. Walking Robot Simulation
874. Walking Robot Simulation
这是一个简单,但是设计的很好的面试题。并没有困难的算法,考验的是一个软件工程师能都写出清晰、简洁代码的能力,以及一些细节问题。
问题
1 | A robot on an infinite XY-plane starts at point (0, 0) and faces north. The robot can receive one of three possible types of commands: |