Array
85. Maximal Rectangle
The elegant move is reducing this 2D problem to the 1D one you already solved: process the matrix row by row, maintaining a histogram where heights[j] is the number of consecutive 1s ending at column…
Loading…
The elegant move is reducing this 2D problem to the 1D one you already solved: process the matrix row by row, maintaining a histogram where heights[j] is the number of consecutive 1s ending at column…
Loading…