1293. Shortest Path in a Grid with Obstacles EliminationQuestionYou are given anm x ninteger matrixgridwhere each cell is either0(empty) or1(obstacle). You can move up, down, left, or right from and to an empty cell inone step.Returnthe minimum number ofstepsto walk from the upper left corner(0, 0)to the lower right corner(m - 1, n - 1)given that you can eliminateat mostkobstacles. If it is not possible to find such walk return-1.Example 1:Input: grid = [[0,0,0],[1,1,0],[0,0,0],[0,1,1],[0,0,0]], k = 1
Output: 6
Explanation:
The shortest path without eliminating any obstacle is 10.
The shortes
...
继续阅读
(70)