0048. 旋转图像 #19
Replies: 6 comments 3 replies
-
致初学者: |
Beta Was this translation helpful? Give feedback.
-
请问为啥这里不需要一个中间变量存储matrix[i][j]也可以正常运行 |
Beta Was this translation helpful? Give feedback.
-
思路一基础思路不难,难的是后续能够写出来N+1,这玩意完全看运气 |
Beta Was this translation helpful? Give feedback.
-
补充一下为什么思路一是玄学,做对的偶然性很大 思路一(数学关系 + 演绎):
|
Beta Was this translation helpful? Give feedback.
-
思路二(数学关系 + 物理意义):
思路二难点在于有这样的数学直觉,其实说白了也是看经验。现在越来越感觉,计算机刷题的本质就是在积攒经验,到不至于说是背题,而是背诵遇到过的各种关键点(比如常见的双指针,不常见的如本题)。 |
Beta Was this translation helpful? Give feedback.
-
是不是有点写错了,文字写【水平翻转】但代码是竖直翻转。要么先转置再水平翻转,要么先竖直翻转再转置 |
Beta Was this translation helpful? Give feedback.
-
0048. 旋转图像 | 算法通关手册
https://algo.itcharge.cn/Solutions/0001-0099/rotate-image/
Beta Was this translation helpful? Give feedback.
All reactions