Simple Modified Dijkstra's Algorithm!!!
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```cpp []\nclass Solution {\npublic:\n    void hlth(vector<vector<int>>& grid,vector<vector<int>>& dist){\n        int n=grid.size();\n        int m=grid[0].size();\n        dist[0][0]=grid[0][0];\n        priority_queue<pair<int,pair<int,int>>,vector<pair<int,pair<int,int>>>,greater<pair<int,pair<int,int>>>>pq;\n        pq.push({dist[0][0],{0,0}});\n        while(!pq.empty()){\n            int mind=pq.top().first;\n            int r=pq.top().second.first;\n            int c=pq.top().second.second;\n            pq.pop();\n            int dr[4]={-1,1,0,0};\n            int dc[4]={0,0,1,-1};\n            for(int x=0;x<4;x++){\n                int nr=r+dr[x];\n                int nc=c+dc[x];\n                if(nr>=0 && nr<n && nc>=0 && nc<m){\n                    if(dist[nr][nc]==-1){\n                        dist[nr][nc]=mind+grid[nr][nc];\n                        pq.push({dist[nr][nc],{nr,nc}});\n                    }\n                    else{\n                        if(mind+grid[nr][nc]<dist[nr][nc]){\n                            dist[nr][nc]=mind+grid[nr][nc];\n                            pq.push({dist[nr][nc],{nr,nc}});\n                        }\n                    }\n                }\n            }\n        }\n    }\n    bool findSafeWalk(vector<vector<int>>& grid, int health) {\n        int n=grid.size();\n        int m=grid[0].size();\n        vector<vector<int>>dist(n,vector<int>(m,-1));\n        hlth(grid,dist);\n        if(health>dist[n-1][m-1]) return true;\n        return false;\n    }\n};\n```
['C++']