Search
⌘K

Leetcode 1292. Maximum Side Length of a Square with Sum Less than or Equal to Threshold

Find the largest side length k such that there exists a k×k submatrix with sum ≤ threshold; typical approaches use 2D prefix sums to query square sums efficiently and binary search (or scan) over k given m,n ≤ 300.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.