Problem 1329 · Medium

Sort the Matrix Diagonally

Sort each diagonal that runs from top-left to bottom-right, one diagonal at a time.

Open the interactive visualisation