Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #User function Template for python3
- class Solution:
- def sortedMatrix(self,N,Mat):
- #code here
- ans = []
- x=0
- for i in Mat:
- ans.extend(i)
- ans.sort()
- for i in range(N):
- for j in range(N):
- Mat[i][j] = ans[x]
- x = x+1
- return Mat
Advertisement
Add Comment
Please, Sign In to add comment