Available question text
Find the maximum-sum subrectangle in an m×n matrix whose sum is no larger than k. The core challenge is reducing the 2D problem to many 1D "max subarray ≤ k" problems by fixing two boundaries and using prefix sums with an ordered set to quickly find the best subarray; iterate over the smaller dimension if rows ≫ columns.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 363. Max Sum of Rectangle No Larger Than K
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source