Simple DP || Traditional Method✅✅
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    boolean[][] vis;\n    int[][][] dp;\n    boolean check(List<List<Integer>> grid, int row, int col, int hlt) {\n        int m = grid.size(); int n = grid.get(0).size();\n        if (row >= m || col >= n || row<0 || col<0 || hlt<=0 || vis[row][col]) return false;\n        if (row==m-1 && col==n-1) {\n            return hlt>grid.get(row).get(col);\n        }\n        if (dp[row][col][hlt]!=-1) return dp[row][col][hlt]==1;\n        vis[row][col] = true;\n        boolean up = check(grid,row-1,col,hlt-grid.get(row).get(col));\n        boolean dw = check(grid,row+1,col,hlt-grid.get(row).get(col));\n        boolean lf = check(grid,row,col-1,hlt-grid.get(row).get(col));\n        boolean rf = check(grid,row,col+1,hlt-grid.get(row).get(col));\n        vis[row][col] = false;\n        boolean result = up || dw || lf || rf;\n        if(result){\n            dp[row][col][hlt]=1;\n        }\n        else dp[row][col][hlt]=0;\n        return result;\n    }\n    public boolean findSafeWalk(List<List<Integer>> grid, int health) {\n        int m = grid.size();\n        int n = grid.get(0).size();\n        dp = new int[m][n][health+1];\n        for(int i=0;i<m;i++){\n            for(int j=0;j<n;j++){\n                Arrays.fill(dp[i][j],-1);\n            }\n        }\n        vis = new boolean[m][n];\n        return check(grid, 0, 0, health);\n    }\n}\n```
['Dynamic Programming', 'Breadth-First Search', 'C++', 'Java', 'JavaScript']