A strange printer can print on a grid of dimensions m $ imes$ n. In each operation, the printer chooses a color and paints a solid rectangle of that color onto the grid, overwriting any colors previously present in that rectangular region. Each color can be printed at most once.
Given an m $ imes$ n integer matrix targetGrid, return true if it is possible to print targetGrid using this printer, or false otherwise.
Constraints:
m targetGrid.length
n targetGrid[i].length
m, n
targetGrid[row][col]
A strange printer can print on a grid of dimensions m $ imes$ n. In each operation, the printer chooses a color and paints a solid rectangle of that color onto the grid, overwriting any colors previously present in that rectangular region. Each color can be printed at most once.
Given an m $ imes$ n integer matrix targetGrid, return true if it is possible to print targetGrid using this printer, or false otherwise.
Constraints:
m targetGrid.length
n targetGrid[i].length
m, n
targetGrid[row][col]