魔法师 (@Constanline)Leetcode每日一题 —— 1292. 元素和小于等于阈值的正方形的最大边长 中发帖

1292. 元素和小于等于阈值的正方形的最大边长 
思路
受昨天思路影响,感觉昨天的改改就能用。
用数组记录 (i,0) 到 (i,j) 的数字之和,然后从大到小遍历每个正方形,尝试其内总和是否小于限制。
代码
class Solution {
private int[][] dp;
private int threshold;
public int maxSideLength(int[][] mat, int threshold) {
int m = mat.length;
int n = mat[0].length;
this.threshold = threshold;
// 记录 (i,0) 到 (i,j) 的数字总和
dp = new int[m + 1][n + 1]...