Available question text
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.
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 1139. Largest 1-Bordered Square
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source