Skip to content

Commit a588a63

Browse files
committed
Runtime: 25 ms (Top 22.29%) | Memory: 144.4 MB (Top 28.51%)
1 parent 362a58a commit a588a63

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/algorithms/R/Rotating the Box/Rotating the Box.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 25 ms (Top 22.29%) | Memory: 144.4 MB (Top 28.51%)
12
class Solution {
23
public char[][] rotateTheBox(char[][] box) {
34
int row = box.length, col = box[0].length;
@@ -8,8 +9,8 @@ public char[][] rotateTheBox(char[][] box) {
89
res[j][i] = box[row-1-i][j];
910
}
1011
}
11-
12-
for (int i = col - 1; i >= 0; i--) {
12+
13+
for (int i = col - 1; i >= 0; i--) {
1314
for (int j = 0; j < row; j++) {
1415
if (res[i][j] == '#') {
1516
int curRow = i;
@@ -25,4 +26,4 @@ public char[][] rotateTheBox(char[][] box) {
2526
}
2627
return res;
2728
}
28-
}
29+
}

0 commit comments

Comments
 (0)