LeetCode代码优化
经常需要在函数间传递的变量,可以定义为成员变量。例如,liweiwei1419:回溯算法(Java)。public class Solution { private static final int[][] DIRECTIONS = {{-1, 0}, {0, -1}, {0, 1}, {1, 0}}; private int rows; private int cols; private int len; private boolean[][] visite.
复制链接