public class Solution {
public int[][] rotateMatrix(int[][] mat, int n) {
// write code here
//mat[i][j]旋转到mat[j][n-i-1]的位置
int[][] temp = new int[n][n];
for(int i = 0;i<n;i++){
for(int j = 0;j< n;j++){
temp[j][n-1-i] = mat[i][j];
}
}
return temp;
}
}