Nice O(n^2) solution
class Solution {\npublic:\n    int orderOfLargestPlusSign(int n, vector>& mines) {\n        \n        vector< vector< int >>DP( n, vector< int >( n, 1));\n     
class Solution {\npublic:\n    int orderOfLargestPlusSign(int n, vector<vector<int>>& mines) {\n        \n        vector< vector< int >>DP( n, vector< int >( n, 1));\n                                                            \n        for( auto x:mines )\n            DP[ x[0] ][ x[1] ] = 0;\n        \n        vector< vector< int >>left = DP, top = DP, right = DP, bottom =DP;  \n        \n        for( int i=0 ; i<n ; i++ ){\n            \n            for( int j=0 ; j<n ; j++ ){\n                \n                if( DP[ i ][ j ] ){\n                    \n                    if( j>0 )\n                        left[ i ][ j ] = 1 + left[ i ][ j-1 ];\n                    else\n                        left[ i ][ j ] = 1;\n                    \n                    if( i>0 )\n                        top[ i ][ j ] = 1 + top[ i-1 ][ j ];\n                    else\n                        top[ i ][ j ] = 1;\n                }\n            }\n        }\n        \n        int maxm = 0;\n        \n        for( int i=n-1 ; i>=0 ; i-- ){\n            \n            for( int j=n-1 ; j>=0 ; j-- ){\n                \n                if( DP[ i ][ j ] ){\n                    \n                    if( j<(n-1) )\n                        right[ i ][ j ] = 1 + right[ i ][ j+1 ];\n                    else\n                        right[ i ][ j ] = 1;\n                    \n                    if( i<(n-1) )\n                        bottom[ i ][ j ] = 1 + bottom[ i+1 ][ j ];\n                    else\n                        bottom[ i ][ j ] = 1;\n                }\n                \n                int k = min({ left[i][j] , right[i][j] , top[i][j] , bottom[i][j] });\n                \n                maxm = max( k, maxm );\n            }\n        }\n        \n        return maxm;\n    }\n};
['Dynamic Programming', 'C']