Leetcode 3286. Find a Safe Walk Through a Grid
Determine whether there's a 4-directional path from the top-left to bottom-right of an m×n binary grid such that the number of unsafe cells (grid[i][j]==1) encountered is less than health (so your health stays positive). It's a budgeted shortest-path problem on a grid where unsafe cells cost 1 and you must stay within the given health budget.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.