Maximal Square
matrix contains the strings "0" and "1". Return the area of the largest square containing only "1"s.
Examples
EXAMPLE WALKTHROUGHclassic
A guided view of the published example, not a trace of your code.
INPUT
[[["1","0","1","0","0"],["1","0","1","1","1"],["1","1","1","1","1"],["1","0","0","1","0"]]]TASKmaximal_square_area()
EXPECTED OUTPUT
4Start with the input values shown in this example.
Example 1 of 3
Input: matrix = [["1","0","1","0","0"],["1","0","1","1","1"],["1","1","1","1","1"],["1","0","0","1","0"]]
Output: 4
Explanation: classic
Input: matrix = [["0","1"],["1","0"]]
Output: 1
Explanation: diagonal ones
Input: matrix = [["0"]]
Output: 0
Explanation: single zero
Hint 1
s[r][c] is the side of the largest square whose bottom-right corner is (r, c).