need to use scratch to find the pattern
class Solution {
public void rotate(int[][] matrix) {
int n=matrix.length;
for (int i=0; i<n/2; i++)
for (int j=i; j<n-i-1; j++) {...
[leetcode] 48. rotate image 旋转图像
you are given an n x n 2d matrix representing an image.
rotate the image by 90 degrees (clockwise).
note:
you have to rotate the image ...