← Questions
Find a repeating command program for a vehicle under fuel and memory limits
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A vehicle on a grid starts at a given cell with 100 fuel. Each move up, down, left or right costs one unit; at a station it can refuel 50 units; obstacles block movement. It can store at most ten commands and repeats its program forever. Find a short program that meets the goal the interviewer sets (for example, reaching a target without running out of fuel), and explain how you search the space of programs.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
