C++ || EASY TO UNDERSTAND || Simple solution Prefix Sum
\nclass Solution {\npublic:\n    int orderOfLargestPlusSign(int n, vector<vector<int>>& mines) {\n     vector<vector<int> > v(n,vector<int>(n,1));\n     for(aut
```\nclass Solution {\npublic:\n    int orderOfLargestPlusSign(int n, vector<vector<int>>& mines) {\n     vector<vector<int> > v(n,vector<int>(n,1));\n     for(auto &it:mines)\n     {\n         v[it[0]][it[1]]=0;\n     }\n      vector<vector<int> > top,bottom,left,right;\n      top=left=right=bottom=v;\n        for(int i=0;i<n;i++)\n        {\n            for(int j=0;j<n;j++)\n            {\n               int x,y;\n                x=n-1-i;\n                y=n-1-j;\n               if(j>0&&left[i][j])\n               left[i][j]=left[i][j]+left[i][j-1];\n               if(i>0&&top[i][j])\n               top[i][j]+=top[i-1][j];\n               if(x<n-1&&bottom[x][y])\n               bottom[x][y]+=bottom[x+1][y];\n               if(y<n-1&&right[x][y])\n               right[x][y]+=right[x][y+1];\n            }\n        }\n        int ans=INT_MIN;\n        for(int i=0;i<n;i++)\n        {\n            for(int j=0;j<n;j++)\n            {\n                ans=max(ans,min(top[i][j],min(bottom[i][j],min(left[i][j],right[i][j]))));\n            }\n        }\n        return ans;\n    }\n};\n```\n**Please upvote to motivate me in my quest of documenting all leetcode solutions(to help the community). HAPPY CODING:)\nAny suggestions and improvements are always welcome**
[]