C++ || Simple and Concise || DP
TC: O(3 * (N^2)) ---> ~= O(N^2)\nSC: O(4 * (N^2)) ---> ~= O(N^2)\n\nclass Solution {\npublic:\n    int orderOfLargestPlusSign(int n, vector<vector<int>>& arr) {
TC: O(3 * (N^2)) ---> ~= O(N^2)\nSC: O(4 * (N^2)) ---> ~= O(N^2)\n```\nclass Solution {\npublic:\n    int orderOfLargestPlusSign(int n, vector<vector<int>>& arr) {\n        \n        vector<vector<int>>nums(n,vector<int>(n,1));\n        for(auto &it:arr){\n            nums[it[0]][it[1]]=0;\n        }\n        vector<vector<int>>left=nums,right=nums,up=nums,down=nums;\n        \n        //up + left\n        for(int i=0;i<n;i++){\n            for(int j=0;j<n;j++){\n                if(nums[i][j]==1){\n                    up[i][j]+=   (i-1<0 ? 0 : up[i-1][j]);\n                    left[i][j]+= (j-1<0 ? 0 :left[i][j-1]);\n                }   \n            }\n        }\n        \n        //right + down \n        for(int i=n-1;i>=0;i--){\n            for(int j=n-1;j>=0;j--){\n                if(nums[i][j]==1){\n                    right[i][j]+= (j+1>=n ? 0 : right[i][j+1]);\n                    down[i][j]+=  (i+1>=n ? 0 : down[i+1][j]);\n                }\n            }\n        }        \n        \n        int maxi=0;\n        for(int i=0;i<n;i++){\n            for(int j=0;j<n;j++){\n                int area= \n                    min({left[i][j],right[i][j],up[i][j],down[i][j]});\n                maxi=max(maxi,area);\n            }\n        }\n        return maxi;\n    }\n};\n```
['Dynamic Programming', 'C++']