每次都是转圈打印,所以记二维数组的左上和右下坐标,一圈圈打印即可 public static ArrayList<Integer> printMatrix(int [][] matrix) { if(matrix==null||matrix.length==0)return null; ArrayList<Integer> res = new ArrayList<>(); return printCircle(res,matrix,0,0,matrix.length-1,matrix[0].length-1...