/*
2.1.16 Rotate Image
You are given an n × n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Follow up: Could you do this in-place?
1 2 3 1
3 4 -> 4 2 二维数组旋转九十度
1、对角线旋转
12 42
34 31
2、水平旋转
42 31
31 42
算法:
首先确定对角线元素
确定水平线元素
1、对角线上半部分a[i][j], i=[0,n] j=[0,n-i]
思考:
行和列不相等怎么旋转
*/
include “type.h”
int arr_image[][2]={
{1,2},
{3,4}
};
int rowNum_Image = sizeof(arr_image)/sizeof(arr_image[0]);
int column_image = sizeof(arr_image[0])/sizeof(int);
vector