Intuitive| Explained with image | Short and Clean | C++
Step 1: Create n x n matrix having all values 1 and assign the mines values as 0.\nStep 2: Create another 4 matrix (say lef, rig, top, bot).\n lef means left an
**Step 1:** Create n x n matrix having all values 1 and assign the mines values as 0.\n**Step 2:** Create another 4 matrix (say lef, rig, top, bot).\n* ``` lef``` means left and ```lef[i][j]``` will represent no of continious block in left having values 1\n\t\t```lef[ 3 ][ 2 ] = 3```\n\t\t![image](https://assets.leetcode.com/users/images/0471bc00-e5e8-40e0-a166-beb0c62452a7_1631176416.7804954.png) \n\n* ``` rig``` means right and ```rig[i][j]``` will represent no of continious block in right having values 1\n\t\t```rig[ 3 ] [ 2 ] = 2```\n\t\t![image](https://assets.leetcode.com/users/images/db6685de-3044-4151-b786-231e391a0720_1631176553.0291495.png)\n\n* ``` top``` means top and ```top[i][j]``` will represent no of continious block in top having values 1\n\t\t```top[ 3 ] [ 2 ] = 4```\n\t\t![image](https://assets.leetcode.com/users/images/c1ed5229-65bb-46b0-a9fb-ea44fa621caa_1631176680.5248642.png)\n\n* ``` bot``` means bottom and ```bot[i][j]``` will represent no of continious block in bottom having values 1\n\t\t```bot[ 3 ] [ 2 ] = 3```\n\t\t![image](https://assets.leetcode.com/users/images/4caacd49-6037-44c8-9a81-fe9f101b413e_1631176732.806423.png)\n\n**Step 3:** Fill the above four matrix \n* If values inside a cell is equal to 0, means that cell can not be center of the plus sign, so just ignore those cells.\n* If values inside a cell is equal to 1, so value of this cell will be 1 more that other adjacent cells in different direction of corresponding matrix.\n* **Note:** For matrix ```bot```, ```rig``` we need the value of the cells from the bottom cell and right cell. But as we are moving ``` i = 0 to n```, ```j = 0 to n``` means from left to right and top to bottom so those cells are not filled yet. So we have to fill these two matrix from right to left and bottom to top. And in order to so, we just have to change the index ``` x = n - 1 - i```, ```y = n - 1 - j```.\n\n**Step 4:** For each index check what is maximum size of "+" symbol we can find. \nTo create  "+" from a given index we have to choose all fours arms of equal length. So by selecting minimum of all the four arms we can get "+" sign of maximum size from that index.\n\n```min({3, 2, 4, 3}) = 2```\n![image](https://assets.leetcode.com/users/images/5c5511f0-ea03-4906-a6f9-cf7f976dee31_1631177082.7194176.png)\n\n**Code:** \n```\nint orderOfLargestPlusSign(int n, vector<vector<int>>& mines) {\n\n    vector<vector<int>> mat(n, vector<int>(n, 1));\n    for(auto it : mines)\n    {\n        int x = it[0] ;\n        int y = it[1] ;\n        mat[x][y] = 0;\n    }\n\n    vector<vector<int>> lef, rig, top, bot;\n    lef = rig = top = bot = mat;\n\n    for(int i=0;i<n;i++)\n    {\n        for(int j=0;j<n;j++)\n        {\n            int x = n - i - 1;\n            int y = n - j - 1;\n            if( (i>0)   && top[i][j] ) top[i][j] += top[i-1][j];\n            if( (j>0)   && lef[i][j] ) lef[i][j] += lef[i][j-1];\n            if( (x<n-1) && bot[x][y] ) bot[x][y] += bot[x+1][y];\n            if( (y<n-1) && rig[x][y] ) rig[x][y] += rig[x][y+1];\n        }\n    }\n\n    int ans = 0;\n    for(int i=0;i<n;i++)\n        for(int j=0;j<n;j++)\n            ans = max(ans, min({lef[i][j], rig[i][j], top[i][j], bot[i][j]}));\n\n    return ans;\n}\n```
['C']