Problem
You are given a grid matrix filled with the strings "0" and "1". Find the largest square containing only `"1"`s and return its area.
Example 1
matrix = [["1","0","1","0","0"],
Example 2
["1","0","1","1","1"],
Example 3
["1","1","1","1","1"],
Example 4
- Input
- ["1","0","0","1","0"]]
- Output
- 4
- Why
- a 2 × 2 square
Example 5
matrix = [["0","1"],
Example 6
- Input
- ["1","0"]]
- Output
- 1
Constraints
1 <= m, n <= 300 where the grid is m × nmatrix[r][c] is "0" or "1"