The robot is initially at (x, y), x > 0 and y < 0. The minimum number of instructions needed to be executed to bring it to the origin (0, 0) if you are prohibited from using the GOTO instruction is
Explanation:
Two instructions are needed, one parallel to the X-axis and the other parallel to the Y-axis. i.e. WALKX(–x) and WALKY (–y)
Help us build a Free and Comprehensive Preparation portal for various competitive exams by providing us your valuable feedback about Apti4All and how it can be improved.