C++ DP solution
Same implementation as given in solution. Just in C++\n\nclass Solution {\npublic:\n    int orderOfLargestPlusSign(int n, vector<vector<int>>& mines) {\n       
Same implementation as given in solution. Just in C++\n```\nclass Solution {\npublic:\n    int orderOfLargestPlusSign(int n, vector<vector<int>>& mines) {\n        set<int> banned;\n        vector<vector<int>> dp(n,vector<int>(n));\n        for(int i=0;i<mines.size();i++) {\n            banned.insert(mines[i][0]*n + mines[i][1]);\n        }\n        int ans=0,count=0;\n\n        for(int i=0;i<n;i++) {\n            count =0;\n            for(int j=0;j<n;j++) {\n                count = (banned.find(i*n+j)!=banned.end()) ? 0 : count+1;\n                dp[i][j] = count;\n            }\n            count =0;\n            for(int j=n-1;j>=0;j--) {\n                count = (banned.find(i*n+j) != banned.end()) ? 0 : count+1;\n                dp[i][j] = min(dp[i][j] , count);\n            }\n        }\n        \n        for(int j=0;j<n;j++) {\n            count=0;\n            for(int i=0;i<n;i++) {\n                count = (banned.find(i*n+j)!=banned.end()) ? 0 : count+1;\n                dp[i][j] = min(dp[i][j],count);\n            }\n            count=0;\n             for(int i=n-1;i>=0;i--) {\n                count = (banned.find(i*n+j) != banned.end()) ? 0 : count+1;\n                dp[i][j] = min(dp[i][j] , count);\n                ans = max(ans , dp[i][j])  ; \n            }\n        }\n        return ans;        \n    }\n};\n```
['Dynamic Programming', 'C', 'C++']