Maximal Square

Maximal Square

Given an m × n matrix matrix containing only characters '0' and '1', find the largest square consisting entirely of '1's and return its area.

In the interview, explain in ...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: