Documentation
¶
Overview ¶
https://leetcode-cn.com/problems/transpose-matrix/
867. 转置矩阵
给你一个二维整数数组 matrix, 返回 matrix 的 转置矩阵 。 矩阵的 转置 是指将矩阵的主对角线翻转,交换矩阵的行索引与列索引。
提示:
m == matrix.length n == matrix[i].length 1 <= m, n <= 1000 1 <= m * n <= 105 -109 <= matrix[i][j] <= 109
Click to show internal directories.
Click to hide internal directories.