Submission Detail

21 / 21 test cases passed.
Status:

Accepted

Runtime: 19 ms
Memory Usage: 13.3 MB
Submitted: 0 minutes ago
loading
Runtime Error Message:
Last executed input:
Input:
Output:
Expected:

Accepted Solutions Runtime Distribution

0
5
10
15
20
25
30
35
40
2.5
5.0
7.5
10.0
12.5
python
You are here!
Your runtime beats 76.39 % of python submissions.
Runtime (ms)
Distribution (%)

0
5
10
15
20
25
30
35
40
5
10
Zoom area by dragging across this chart

Accepted Solutions Memory Distribution

13250
13000
13050
13100
13150
13200
13300
13350
13400
13450
13500
5
10
15
20
25
30
35
40
python
You are here!
Your memory usage beats 83.03 % of python submissions.
Memory (KB)
Distribution (%)

13250
13000
13050
13100
13150
13200
13300
13350
13400
13450
13500
10
20
30
40
Zoom area by dragging across this chart

Invite friends to challenge Rotate Image


Submitted Code: 0 minutes ago

Language: python

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Solution(object):
def rotate(self, matrix):
"""
:type matrix: List[List[int]]
:rtype: None Do not return anything, modify matrix in-place instead.
"""
# transpose matrix
new_matrix = []
for i in range(0,len(matrix)):
row = []
for j in range(0,len(matrix)):
row.append(matrix[j][i])
row.reverse()
new_matrix.append(row)
for i in range(0,len(matrix)):
matrix[i] = new_matrix[i]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX