Dijkstra
rust []\nuse std::collections::BinaryHeap;\nuse std::cmp::Reverse;\n\nimpl Solution {\n    pub fn find_safe_walk(grid: Vec<Vec<i32>>, health: i32) -> bool {\n  
```rust []\nuse std::collections::BinaryHeap;\nuse std::cmp::Reverse;\n\nimpl Solution {\n    pub fn find_safe_walk(grid: Vec<Vec<i32>>, health: i32) -> bool {\n        let n = grid.len();\n        let m = grid[0].len();\n        let mut seen = vec![vec![false; m]; n];\n        let mut q : BinaryHeap<(Reverse<i32>, usize, usize)> = BinaryHeap::new();\n        q.push((Reverse(grid[0][0]), 0, 0));\n        seen[0][0] = true;\n        while let Some((Reverse(d), i, j)) = q.pop() {\n            if (i, j) == (n - 1, m - 1) {\n                return d < health\n            }\n            let i1 = i.wrapping_sub(1);\n            let j1 = j.wrapping_sub(1);\n            for (i,j) in [(i, j1), (i, j+1), (i1, j), (i+1, j)] {\n                if seen.get(i).and_then(|v|v.get(j)) == Some(&false) {\n                    q.push((Reverse(d + grid[i][j]), i, j));\n                    seen[i][j] = true\n                }\n            }\n        }\n        unreachable!()\n    }\n}\n```
['Rust']