We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e4c675 commit 8161034Copy full SHA for 8161034
rotate-image/printjin-gmailcom.py
@@ -0,0 +1,8 @@
1
+class Solution:
2
+ def rotate(self, matrix):
3
+ n = len(matrix)
4
+ for i in range(n):
5
+ for j in range(i + 1, n):
6
+ matrix[i][j], matrix[j][i] = matrix[j][i], matrix[i][j]
7
+ for row in matrix:
8
+ row.reverse()
0 commit comments