Given a matrix, construct a answer of the same dimensions. Initially, let answer be identical to matrix. For every cell (i, j) where matrix[i][j] is equal to answer[i][j] with the maximum value found in column j.
Return the matrix answer.
Constraints:
m == matrix.length
n == matrix[i].length
m, n
matrix[i][j]
The input is generated such that each column contains at least one nonnegative integer.
Given a matrix, construct a answer of the same dimensions. Initially, let answer be identical to matrix. For every cell (i, j) where matrix[i][j] is equal to answer[i][j] with the maximum value found in column j.
Return the matrix answer.
Constraints:
m == matrix.length
n == matrix[i].length
m, n
matrix[i][j]
The input is generated such that each column contains at least one nonnegative integer.