← Questions
Shortest path between two cells in a grid
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Given a grid with open and blocked cells, return the length of the shortest path from a start cell to a target cell moving up, down, left and right. A follow-up changes the question so that a depth-first search with memoization (dynamic programming over the grid) is the natural tool, so be ready to move between BFS and DFS with a memo.
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
