Robot route with charging cells: fewest charges, then battery, then moves

0
Remix

A robot crosses a grid from S to D. Cells are . (open), # (blocked) or C (a charging cell). The battery limits how far the robot can go between charges, and a charging cell refills it.

Find a route that uses the fewest charging stops; among those, compare by battery, then by the number of moves. Explain the state you search over and why your ordering is correct. A related screen asked for the lexicographically smallest of the best routes.

UberTechnical phone screenLast asked Aug 2026
No answer yet. Write the first one; the best answer gets endorsed.