1
class Solution:
2
def transpose(self, matrix: List[List[int]]) -> List[List[int]]:
3
rows = len(matrix)
4
cols = len(matrix[0])
5
ans = [[0] * rows] * cols
6
for i in range(cols):
7
for j in range(rows):
8
ans[i][j] = matrix[j][i]
9
return ans

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0