You are given an m x n binary matrix grid, where 0 is a sea cell and 1 is a land cell. A move walks from one land cell to an adjacent (4-directional) land cell or walks off the boundary of the grid. Return the number of land cells from which we cannot walk off the boundary of the grid in any number of moves.
You are given an m x n binary matrix grid, where 0 is a sea cell and 1 is a land cell. A move walks from one land cell to an adjacent (4-directional) land cell or walks off the boundary of the grid. Return the number of land cells from which we cannot walk off the boundary of the grid in any number of moves.