摘要: # 题目 给定一个 n × n 的二维矩阵 matrix 表示一个图像。请你将图像顺时针旋转 90 度。 你必须在 原地 旋转图像,这意味着你需要直接修改输入的二维矩阵。请不要 使用另一个矩阵来旋转图像。 ![image](https://img2023.cnblogs.com/blog/22041 阅读全文
posted @ 2023-08-03 20:02 anamazingclown 阅读(2) 评论(0) 推荐(0) 编辑
摘要: # 题目 给你一个正整数 n ,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的 n x n 正方形矩阵 matrix 。 **示例 1:** ![image](https://img2023.cnblogs.com/blog/2204134/202308/2204134-2023 阅读全文
posted @ 2023-08-03 15:41 anamazingclown 阅读(3) 评论(0) 推荐(0) 编辑
摘要: # 题目 给你一个 m 行 n 列的矩阵 matrix ,请按照 顺时针螺旋顺序 ,返回矩阵中的所有元素。 **示例 1:** ![image](https://img2023.cnblogs.com/blog/2204134/202308/2204134-20230803145822194-967 阅读全文
posted @ 2023-08-03 15:17 anamazingclown 阅读(9) 评论(0) 推荐(0) 编辑