1 2 3
4 5 6
7 8 9
Sorting the matrix gives this result.
You don't need to read input or print anything. Your task is to complete the function sortedMatrix() which takes the integer N and the matrix Mat as input parameters and returns the sorted matrix.
Expected Time Complexity:O(N2LogN) Expected Auxillary Space:O(N2)