Facebook | SWE Intern 2022 OA | Sort 2D Matrix by Secondary Diagonal

Anonymous User
983
Dec 10, 2021
Dec 12, 2021

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)