使用递归,判断所有的点机器人是否可达即可 public class Solution { public int movingCount(int threshold, int rows, int cols) { int[][] flag = new int[rows][cols]; /*记录已经走过的点*/ return helper(0,0,rows,cols,flag,threshold); } public int helper(int i, int j, int rows, int cols, int[][] flag,...