描述 给定一个 n × n 的二维矩阵 matrix 表示一个图像。请你将图像顺时针旋转 90 度。 你必须在 原地 旋转图像,这意味着你需要直接修改输入的二维矩阵。请不要 使用另一个矩阵来旋转图像。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/rotate-image 思路 拆分矩阵,一圈一圈旋转矩阵: 代码 class Solution { public: void rotate(vector<vector<int>>&</