Skip to content

Commit 11a7f59

Browse files
committed
48. Rotate ImageCopy for MarkdownCopy for Markdown
1 parent b7ed0df commit 11a7f59

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main/java/leetcode/_48_/Solution.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
class Solution { // 解决这个问题的关键就是知道,图像旋转90度是可以通过先对称镜像,然后对角线镜像可以得到旋转结果
44
public void rotate(int[][] matrix) {
5-
// 首先按照水平反转
6-
5+
// 首先垂直镜像反转
76
for (int j = 0; j < matrix.length / 2; j++) {
87
for (int i = 0; i < matrix.length; i++) {
98
int tmp = matrix[j][i];

src/main/java/leetcode/_48_/solution.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ Language: **Java**
5757
```java
5858
class Solution { // 解决这个问题的关键就是知道,图像旋转90度是可以通过先对称镜像,然后对角线镜像可以得到旋转结果
5959
   public void rotate(int[][] matrix) {
60-
       // 首先按照水平反转
61-
60+
       // 首先垂直镜像反转
6261
       for (int j = 0; j < matrix.length / 2; j++) {
6362
           for (int i = 0; i < matrix.length; i++) {
6463
               int tmp = matrix[j][i];

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