A matrix diagonal is a diagonal line of cells starting from some cell in either the topmost row or leftmost column and going in the bottom right direction until reaching the edge of the matrix.
Given an mat, sort each matrix diagonal in ascending order and return the resulting matrix.
Constraints:
m mat.length
n mat[i].length
m, n
mat[i][j]
A matrix diagonal is a diagonal line of cells starting from some cell in either the topmost row or leftmost column and going in the bottom right direction until reaching the edge of the matrix.
Given an mat, sort each matrix diagonal in ascending order and return the resulting matrix.
Constraints:
m mat.length
n mat[i].length
m, n
mat[i][j]