← ULA questions
CodingHard

Largest 1-Bordered Square

Filed under ULA

The question

Given a 2D grid of 0s and 1s, return the number of elements in the largest square subgrid that has all 1s on its border, or 0 if such a subgrid doesn't exist in the grid.

No write-up yet. Related questions below have one.

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