Leetcode 3446. Sort Matrix by Diagonals
Given an n×n matrix, reorder each diagonal independently by grouping elements along each top-left to bottom-right diagonal and sorting those that lie on or below the main diagonal in non-increasing order and those above the main diagonal in non-decreasing order, then return the resulting matrix.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.