A builder has a floor plan drawn as a grid of characters. A cell with "1" is a good tile and a cell with "0" is a cracked tile.
Find the largest square area that is made only of good tiles. Return the area of that square (its side length multiplied by itself). If every tile is cracked, return 0.
Examples
Example 1:
Input: matrix = [["1","1","1"],["1","1","1"]]
Output: 4
Explanation: The grid has only 2 rows, so the biggest square is 2 x 2. Area is 4.
Example 2:
Input: matrix = [["1","0","1"],["1","1","1"],["0","1","1"]]
Output: 4
Explanation: The bottom-right 2 x 2 block is all good tiles, so the area is 4.
Example 3:
Input: matrix = [["0","1"],["0","0"]]
Output: 1
Explanation: Only a 1 x 1 square fits, so the area is 1.