1
import numpy
2

3

4
class Solution:
5
def matrixReshape(self, mat: List[List[int]], r: int, c: int) -> List[List[int]]:
6
return numpy.reshape(mat, (r, c)) if r * c == len(mat) * len(mat[0]) else mat

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0