Sort secondary diagonals for a 2D matrix.
Similar to this question: 1329. Sort the Matrix Diagonally. However, the sorting diagonal is the secondary one. I could not solve it as I did not know which way to nest the loop.
Comments (3)
Sort secondary diagonals for a 2D matrix.
Similar to this question: 1329. Sort the Matrix Diagonally. However, the sorting diagonal is the secondary one. I could not solve it as I did not know which way to nest the loop.