[
2d-array
]
BinarySearch 0135 Transpose of a Matrix
Problem statement
https://binarysearch.com/problems/Transpose-of-a-Matrix/
Solution
Equal to Leetcode 0867 Transpose Matrix.
Complexity
It is O(mn)
for time and space.
Code
class Solution:
def solve(self, matrix):
return list(zip(*matrix))