Skip to content

Commit f738a94

Browse files
refactor 48
1 parent 1826336 commit f738a94

File tree

1 file changed

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

1 file changed

+0
-41
lines changed

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

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,6 @@
22

33
import com.fishercoder.common.utils.CommonUtils;
44

5-
/**
6-
* 48. Rotate Image
7-
8-
You are given an n x n 2D matrix representing an image.
9-
10-
Rotate the image by 90 degrees (clockwise).
11-
12-
Note:
13-
You have to rotate the image in-place, which means you have to modify the
14-
input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation.
15-
16-
Example 1:
17-
Given input matrix =
18-
[
19-
[1,2,3],
20-
[4,5,6],
21-
[7,8,9]
22-
],
23-
rotate the input matrix in-place such that it becomes:
24-
[
25-
[7,4,1],
26-
[8,5,2],
27-
[9,6,3]
28-
]
29-
30-
Example 2:
31-
Given input matrix =
32-
[
33-
[ 5, 1, 9,11],
34-
[ 2, 4, 8,10],
35-
[13, 3, 6, 7],
36-
[15,14,12,16]
37-
],
38-
rotate the input matrix in-place such that it becomes:
39-
[
40-
[15,13, 2, 5],
41-
[14, 3, 4, 1],
42-
[12, 6, 8, 9],
43-
[16, 7,10,11]
44-
]
45-
*/
465
public class _48 {
476

487
/**Note: this is an n*n matrix, in other words, it's a square, this makes it easier as well.*/

0 commit comments

Comments
 (0)