Dijkstra's. Simple and clear solution
\nclass Solution:\n    def findSafeWalk(self, grid: List[List[int]], health: int) -> bool:\n        m, n = len(grid), len(grid[0])\n        heap = [(grid[0][0],
```\nclass Solution:\n    def findSafeWalk(self, grid: List[List[int]], health: int) -> bool:\n        m, n = len(grid), len(grid[0])\n        heap = [(grid[0][0], 0, 0)]\n        min_health = [[inf]*n for _ in range(m)]\n        min_health[0][0] = grid[0][0]\n        while heap:\n            curr_health, i, j = heappop(heap)\n            if (i, j) == (m-1, n-1):\n                return True\n            if curr_health == min_health[i][j]:\n                for ii, jj in (i+1, j), (i-1, j), (i, j+1), (i, j-1):\n                    if 0 <= ii < m and 0 <= jj < n:\n                        new_health = curr_health + grid[ii][jj]\n                        if new_health < min_health[ii][jj] and new_health < health:\n                            heappush(heap, (new_health, ii, jj))\n                            min_health[ii][jj] = new_health\n        return False\n```
['Python3']