C++ || SIMPLE || TIME O(n^2)
\nclass Solution {\npublic:\n    int orderOfLargestPlusSign(int n, vector<vector<int>>& mines) {\n        vector<vector<int>> grid(n,vector<int>(n,1));\n       
```\nclass Solution {\npublic:\n    int orderOfLargestPlusSign(int n, vector<vector<int>>& mines) {\n        vector<vector<int>> grid(n,vector<int>(n,1));\n        for(auto &i: mines){\n            grid[i[0]][i[1]] = 0;\n        }\n        vector<vector<int>> left,right,top,bottom;\n        left = vector<vector<int>>(n,vector<int>(n,0));\n        right = vector<vector<int>>(n,vector<int>(n,0));\n        top = vector<vector<int>>(n,vector<int>(n,0));\n        bottom = vector<vector<int>>(n,vector<int>(n,0));\n        int i,j;\n        // for(auto &i: grid){\n        //     for(auto &j: i)cout<<j<<" ";\n        //     cout<<endl;\n        // }\n        for(i = 0; i < n; i++){\n            for(j = 0; j < n; j++){\n                if(j==0){\n                    left[i][j] = (grid[i][j]);\n                }else if(grid[i][j]){\n                    left[i][j] = left[i][j-1]+1;\n                }\n               // cout<<left[i][j]<<" ";\n            }\n            // cout<<endl;\n        }\n        //cout<<endl;\n        for(i = 0; i < n; i++){\n            for(j = n-1; j >= 0; j--){\n                if(j==n-1){\n                    right[i][j] = (grid[i][j]);\n                }else if(grid[i][j]){\n                    right[i][j] =1+ right[i][j+1];\n                }\n                \n               // cout<<right[i][j]<<" ";\n            }\n            // cout<<endl;\n        }//cout<<endl;\n        for(i = 0; i < n; i++){\n            for(j = 0; j < n; j++){\n                if(i==0){\n                    top[i][j] = (grid[i][j]);\n                }else if(grid[i][j]){\n                    top[i][j] +=1+ top[i-1][j];\n                }\n               // cout<<top[i][j]<<" ";\n            }\n            // cout<<endl;\n        }//cout<<endl;\n        for(i = n-1; i >= 0; i--){\n            for(j = 0; j < n; j++){\n                if(i==n-1){\n                    bottom[i][j] = (grid[i][j]);\n                }else if(grid[i][j]){\n                    bottom[i][j] +=1+ bottom[i+1][j];\n                }\n                // cout<<bottom[i][j]<<" ";\n            }\n            // cout<<endl;\n        }\n        int ans = 0;\n        for(i = 0; i < n; i++){\n            for(j = 0; j < n; j++){\n                ans = max(ans,min(min(left[i][j],right[i][j]),min(top[i][j],bottom[i][j])));\n            }\n        }\n        return ans;\n    }\n};\n```
['Dynamic Programming', 'C', 'C++']