Search
⌘K
Get Premium
Leetcode 1139. Largest 1-Bordered Square
Given a binary matrix, return the area of the largest square subgrid whose four borders are entirely 1s (interior may be 0), or 0 if none exists. The core challenge is efficiently validating border-only constraints for many candidate squares in a grid up to 100x100.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.