You are given a grid of size m $ imes$ n.
You can begin at any cell in the first column (column (row, col), you can move to any of the following cells provided that the target cell lies within the grid and contains a value strictly greater than the value of grid[row][col]:
(row - , col + )
(row, col + )
(row + , col + )
Return the maximum number of moves that can be performed.
Constraints:
m == grid.length
n == grid[i].length
m, n
m * n
grid[i][j]
You are given a grid of size m $ imes$ n.
You can begin at any cell in the first column (column (row, col), you can move to any of the following cells provided that the target cell lies within the grid and contains a value strictly greater than the value of grid[row][col]:
(row - , col + )
(row, col + )
(row + , col + )
Return the maximum number of moves that can be performed.
Constraints:
m == grid.length
n == grid[i].length
m, n
m * n
grid[i][j]