You are given an m n binary matrix grid where each cell has a value of either stampHeight and stampWidth representing the dimensions of a rectangular stamp.
You want to determine if it is possible to cover every empty cell using any number of stamps according to these rules:
A stamp must fit entirely within the boundaries of grid.
A stamp cannot cover any cell with a value of
Stamps are allowed to overlap each other.
Every cell with a value of
Return true if all empty cells can be covered, or false otherwise.
Constraints:
m grid.length
n grid[r].length
m, n
m n
grid[r][c] is either
stampHeight, stampWidth
You are given an m n binary matrix grid where each cell has a value of either stampHeight and stampWidth representing the dimensions of a rectangular stamp.
You want to determine if it is possible to cover every empty cell using any number of stamps according to these rules:
A stamp must fit entirely within the boundaries of grid.
A stamp cannot cover any cell with a value of
Stamps are allowed to overlap each other.
Every cell with a value of
Return true if all empty cells can be covered, or false otherwise.
Constraints:
m grid.length
n grid[r].length
m, n
m n
grid[r][c] is either
stampHeight, stampWidth