← Questions

Find a repeating command program for a vehicle under fuel and memory limits

0
WaymoCodingLast asked Jun 2026

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.

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