没看到有JavaScript的代码,贴一个在这里思路:用深度优先查找dfsdp是动态规划数组,便于在for循环中减少dfs次数 /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 递增路径的最大长度 * @param matrix int整型二维数组 描述矩阵的每个数 * @return int整型 */ function solve(matrix) { // write code here const mR = matrix.length; const mC = matrix[0].length; const steps = [ [1, 0], [0...