C++ || Faster than 100% || Time O(N^2) || DP ||
In this approach, firstly we will find largest continuous of 1s for upper and left side\nafter this we will find largest continuous of 1s for lower and right si
In this approach, firstly we will find largest continuous of 1s for upper and left side\nafter this we will find largest continuous of 1s for lower and right side\nafter getting largest value for all direction for every index we will select min value from all direction so we will get largest \'+\' sign for every index \n\nhere, dp[][][0] for store largest value from upper side\n\t\t dp[][][1] for store largest value from left side\n\t\t dp[][][2] for store largest value from lower side\n\t\t dp[][][3] for store largest value from right side\n\t\t \nand array v[N][N] is for showing 1s and 0s postion in the array\t\t \n\n```\nclass Solution {\npublic:\n    int orderOfLargestPlusSign(int N, vector<vector<int>>& mines) {\n        int ans=0,s,i,j,k;\n        int dp[N+2][N+2][4],v[N][N]; // v[N][N] for showing 0 and 1 position and dp[][][] for getting largest value \n        for(i=0;i<N;i++)for(j=0;j<N;j++)v[i][j]=1;\n        for(i=0;i<mines.size();i++)v[mines[i][0]][mines[i][1]]=0;\n        memset(dp,0,sizeof dp);\n        \n\t\t//first we store largest value from top left to bottom right\n        for(i=0;i<N;i++){\n            for(j=0;j<N;j++){\n                if(v[i][j]==1){\n                    dp[i+1][j+1][0]=dp[i][j+1][0]+1;  //dp[][][0] for store largest value from upper side\n                    dp[i+1][j+1][1]=dp[i+1][j][1]+1; //dp[][][1] for store largest value from left side\n                }\n            }\n        }\n        \n\t\t// we store largest value from bottom right to top left\n        for(i=N-1;i>=0;i--){\n            for(j=N-1;j>=0;j--){\n                if(v[i][j]==1){\n                    dp[i+1][j+1][2]=dp[i+2][j+1][2]+1;  //dp[][][2] for store largest value from lower side\n                    dp[i+1][j+1][3]=dp[i+1][j+2][3]+1;  //dp[][][3] for store largest value from right side\n                }\n            }\n        }\n        for(i=1;i<=N;i++){\n            for(j=1;j<=N;j++){\n                s=min(dp[i][j][0],min(dp[i][j][1],min(dp[i][j][2],dp[i][j][3])));  // now we will select min value from all direction .. hence we will get largest \'+\' sign for index (i,j)\n                ans=max(ans,s);\n            }\n        }\n         \n        return ans;\n    }\n};\n```\n\nIf you like this approach then pls Thumbs Up :)\n
['Dynamic Programming', 'C', 'Iterator']