我们可以按照递归的思路来进行,每次打印矩阵的外圈,然后剩下的内部的小矩阵重复这个过程。 ArrayList<Integer> res = new ArrayList<>(); int[][] Matrix; public ArrayList<Integer> printMatrix(int [][] matrix) { Matrix = matrix; int row = matrix.length; if(row == 0) return res; int col = matrix[0].length; helper(0,0,row-1,col-1); ...