C++ || Optimised Solution || Sliding Window solution
\nclass Solution {\npublic:\n    vector<vector<int>> largestLocal(vector<vector<int>>& grid) {\n        \n        int n= grid.size();\n         vector<vector<in
```\nclass Solution {\npublic:\n    vector<vector<int>> largestLocal(vector<vector<int>>& grid) {\n        \n        int n= grid.size();\n         vector<vector<int>>v(n-2, vector<int>(n-2));\n        for (int i=0; i<n-2; i++)\n        {\n            int temp1=0;\n            int temp2=0;\n            int temp3=0;\n             \n            for (int k=i; k<i+3; k++ )\n            {\n                temp1=max(temp1, grid[k][0]);\n                temp2=max(temp2, grid[k][1]);\n                temp3=max(temp3, grid[k][2]);\n            }\n            \n            v[i][0]= max(temp1, max(temp2, temp3));\n            for (int j=1; j<n-2; j++)\n            {\n                temp1= temp2;\n                temp2= temp3;\n                temp3= max(grid[i][j+2], max(grid[i+1][j+2],grid[i+2][j+2]));\n                v[i][j]= max(temp1, max(temp2, temp3));\n            }\n        }\n        return v;\n    }\n};\n```
['C', 'Sliding Window']