You are given an grid and an integer k.
A submatrix is considered sorted if every row within it is sorted in non increasing order.
Return the number of sorted submatrices such that the maximum element in the submatrix is at most k.
Constraints:
grid.length
grid[i].length
grid[i][j]
k
You are given an grid and an integer k.
A submatrix is considered sorted if every row within it is sorted in non increasing order.
Return the number of sorted submatrices such that the maximum element in the submatrix is at most k.
Constraints:
grid.length
grid[i].length
grid[i][j]
k