โ† BNY Mellon questions
CodingReported in a candidate post, Apr 2022

Max k for submatrix sum

Filed under BNY Mellon

Given an `R x C` matrix of non-negative integers and an integer `max_sum`, find the maximum square submatrix size `k` such that every `k x k` submatrix has a sum less than or equal to `max_sum`.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related BNY Mellon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.