Bugged Robot
You have a robot which is supposed to follow the instructions you have laid out for it. You have an array $A$ of $N$ **positive integers**. - The robot starts at $(0, 0)$ facing the positive $X$ axis. - Then, for each $i$ from $1$ to $N$: - The robot moves $A_i$ steps in the direction it is facing. - After that, the robot is supposed to turn $90$ degrees clockwise. Unfortunately, the ro
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start