Skip to content

Latest commit

 

History

History
 
 

minimum-path-cost-in-a-hidden-grid

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

< Previous                  Next >

Related Topics

[Heap] [Depth-first Search] [Graph]

Hints

Hint 1 The grid is at a maximum 100 x 100, so it is clever to assume that the robot's initial cell is grid[101][101]
Hint 2 Run a DFS from the robot's position to make sure that you can reach the target, otherwise you should return -1.
Hint 3 Now that you are sure you can reach the target and that you know the grid, run Dijkstra to find the minimum cost.