← ALL NOTES
Array

3446. Sort Matrix by Diagonals

Given a square n×n matrix. Sort each diagonal: diagonals below/on the main diagonal descending, diagonals above the main diagonal ascending. Return the matrix.

Loading…