Search⌘ K
AI Features

Solution: Transpose Matrix

Solution: Transpose Matrix takes a two-dimensional integer matrix and asks you to return its transpose, with each row becoming a column and each column becoming a row. It may be rectangular.

Statement

Given a matrix represented as a 2D integer list, return its transpose. The transpose of a matrix is obtained by swapping its rows with its columns or vice versa.

Constraints:

  • 1≤1 \leq ...