CodingReported in a candidate post, Aug 2020
Maximum size square with 1s on its perimeter in a binary matrix
Filed under Curefit
The question
Given a 2D binary array, find the maximum side length of a square whose entire perimeter consists of 1s, while the cells inside the square can be either 0 or 1.
No write-up yet. Related questions below have one.
Related Curefit questions
Collected from public candidate posts and coding forums. Updated Nov 2026.