Skip to content

Commit 45c172c

Browse files
refactor 867
1 parent 51845af commit 45c172c

File tree

1 file changed

+20
-0
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+20
-0
lines changed

src/main/java/com/fishercoder/solutions/_867.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
package com.fishercoder.solutions;
22

3+
/**
4+
* 867. Transpose Matrix
5+
*
6+
* Given a matrix A, return the transpose of A.
7+
* The transpose of a matrix is the matrix flipped over it's main diagonal, switching the row and column indices of the matrix.
8+
*
9+
* Example 1:
10+
*
11+
* Input: [[1,2,3],[4,5,6],[7,8,9]]
12+
* Output: [[1,4,7],[2,5,8],[3,6,9]]
13+
* Example 2:
14+
*
15+
* Input: [[1,2,3],[4,5,6]]
16+
* Output: [[1,4],[2,5],[3,6]]
17+
*
18+
* Note:
19+
*
20+
* 1 <= A.length <= 1000
21+
* 1 <= A[0].length <= 1000
22+
* */
323
public class _867 {
424
public static class Solution1 {
525
public int[][] transpose(int[][] A) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy