[Python] Nothing Fancy - 3 Steps
html5\n<b>Time Complexity: O(N<sup>2</sup>)\nSpace Complexity: O(N<sup>2</sup>)</b>\n\n\n1. Make a binary grid where 1s represent spaces that can be used to mak
```html5\n<b>Time Complexity: O(N<sup>2</sup>)\nSpace Complexity: O(N<sup>2</sup>)</b>\n```\n\n1. Make a binary **grid** where 1s represent spaces that can be used to make a plus sign and 0s are mines.  \n\n2. Make 4 helper grids **left, right, up,** and **down**.  \nleft[i][j] says how many 1s there are to the **left** of location (i, j)\nLikewise right[i][j] says how many 1s there are to the **right** of location (i, j).  \nSame for **up** and **down**.  \n\n3. The largest plus sign you can make at location (i, j) is the mininum of **left[i][j], right[i][j], up[i][j],** and **down[i][j]**.  \nIterate over all the locations on the grid and return the size of the maximum plus sign you can make.  \n\n<br>\n\n```python\ndef orderOfLargestPlusSign(self, N: int, mines: List[List[int]]) -> int:\n\n\tgrid = [[1 for _ in range(N)] for _ in range(N)]\n\tfor i, j in mines:\n\t\tgrid[i][j] = 0\n\n\tleft = [[0 for _ in range(N)] for _ in range(N)]\n\tright = [[0 for _ in range(N)] for _ in range(N)]\n\tup = [[0 for _ in range(N)] for _ in range(N)]\n\tdown = [[0 for _ in range(N)] for _ in range(N)]\n\n\t# Construct left and right\n\tfor i in range(N):\n\t\tcount = 0\n\t\tfor j in range(N):\n\t\t\tleft[i][j] = count\n\t\t\tcount = count + 1 if grid[i][j] else 0\n\n\t\tcount = 0\n\t\tfor j in range(N-1, -1, -1):\n\t\t\tright[i][j] = count\n\t\t\tcount = count + 1 if grid[i][j] else 0\n\n\t# Construct up and down\n\tfor j in range(N):\n\t\tcount = 0\n\t\tfor i in range(N):\n\t\t\tdown[i][j] = count\n\t\t\tcount = count + 1 if grid[i][j] else 0\n\n\t\tcount = 0\n\t\tfor i in range(N-1, -1, -1):\n\t\t\tup[i][j] = count\n\t\t\tcount = count + 1 if grid[i][j] else 0\n\n\t# Find the largest Plus Sign\n\tres = 0\n\tfor i in range(N):\n\t\tfor j in range(N):\n\t\t\tif grid[i][j]:\n\t\t\t\tsize = min(left[i][j], right[i][j], down[i][j], up[i][j])\n\t\t\t\tres = max(res, size + 1)\n\n\treturn res\n```
[]