Skip to content

Commit d02cab9

Browse files
update method signature
1 parent cbf5fe3 commit d02cab9

File tree

1 file changed

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

1 file changed

+5
-5
lines changed

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
public class _867 {
44
public static class Solution1 {
5-
public int[][] transpose(int[][] A) {
6-
int[][] result = new int[A[0].length][A.length];
7-
for (int i = 0; i < A.length; i++) {
8-
for (int j = 0; j < A[0].length; j++) {
9-
result[j][i] = A[i][j];
5+
public int[][] transpose(int[][] matrix) {
6+
int[][] result = new int[matrix[0].length][matrix.length];
7+
for (int i = 0; i < matrix.length; i++) {
8+
for (int j = 0; j < matrix[0].length; j++) {
9+
result[j][i] = matrix[i][j];
1010
}
1111
}
1212
return result;

0 commit comments

Comments
 (0)