
You are given an n x n square matrix of integers grid . Return the matrix such that:
The diagonals in the bottom-left triangle (including the middle diagonal) are sorted in non-increasing order .
The diagonals in the top-right triangle are sorted in non-decreasing order .
grid.length == grid[i].length == n1 <= n <= 10-10 ^5 <= grid[i][j] <= 10 ^5