โ† BNY Mellon questions

Largest matching submatrix in two binary images

Filed under BNY Mellon

Given two 2D binary matrices `img1` and `img2` of equal size `M x N`, find the maximum area of a square submatrix that is identical in both images at corresponding coordinates.

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.