C++ Easy Solution
Code\n\nclass Solution {\npublic:\n    int directionArray[5] = {0,1,0,-1,0};\n    int dp[500][500][4];\n    int n;\n    int solve(int x,int y,vector<vector<int>
# Code\n```\nclass Solution {\npublic:\n    int directionArray[5] = {0,1,0,-1,0};\n    int dp[500][500][4];\n    int n;\n    int solve(int x,int y,vector<vector<int>>& arr,int direction){\n        if(x < 0 || y < 0 || x >= n || y >= n || arr[x][y] == 0)\n            return 0;\n        if(dp[x][y][direction] != -1)\n            return dp[x][y][direction];\n        return dp[x][y][direction] = 1 + solve(x+directionArray[direction],y+directionArray[direction+1],arr,direction);\n    }\n    int orderOfLargestPlusSign(int n, vector<vector<int>>& mines) {\n        this->n = n;\n        vector<vector<int>>arr(n,vector<int>(n,1));\n        memset(dp,-1,sizeof(dp));\n        for(int i = 0;i<mines.size();i++){\n            arr[mines[i][0]][mines[i][1]] = 0;\n        }\n        int ans = 0;\n        for(int i = 0;i < n;i++){\n            for(int j = 0;j < n;j++){\n                int mini = INT_MAX;\n                for(int k = 0;k < 4;k++)\n                    mini = min(mini,solve(i,j,arr,k));\n                ans = max(mini,ans);\n            }\n        }\n        return ans;\n    }\n};\n```
['Dynamic Programming', 'Recursion', 'Memoization', 'C++']