3286. Find a Safe Walk Through a Grid
·
Algorithm/Leetcode
https://leetcode.com/problems/find-a-safe-walk-through-a-grid/description/ You are given an m x n binary matrix grid and an integer health.You start on the upper-left corner (0, 0) and would like to get to the lower-right corner (m - 1, n - 1).You can move up, down, left, or right from one cell to another adjacent cell as long as your health remains positive.Cells (i, j) with grid[i][j] = 1 are ..