题解 | #像素翻转#
像素翻转
https://www.nowcoder.com/practice/17ab1e527c504df09a600e1af09d9a60
import java.util.*; public class Transform { public int[][] transformImage(int[][] mat, int n) { // write code here int [][] mat2 = new int [n][n]; for(int i = 0;i<n;i++){ for(int j =0;j<n;j++){ mat2[j][i] = mat[n-i-1][j]; } } return mat2; } }