← Questions
Shortest path on a grid with a custom move set
0
I was asked this
No reports yet. Sign in to say where you were asked it.
An atom sits on a grid of open (.) and forbidden (#) cells and must reach a target cell. Instead of the usual four moves you get a list of allowed moves, each a row and column offset; every move costs one step and can be reused. Return the shortest sequence of moves (as move indexes) from start to target, choosing the lexicographically smallest sequence among the shortest ones, or report that the target can't be reached.
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
