C++||SLIDING WINDOW||
\n\n# Code\n\nclass Solution {\npublic:\n    vector<vector<int>> largestLocal(vector<vector<int>>& grid) {\n        int n = grid.size();\n\n        for(int i = 
\n\n# Code\n```\nclass Solution {\npublic:\n    vector<vector<int>> largestLocal(vector<vector<int>>& grid) {\n        int n = grid.size();\n\n        for(int i = 1; i < n - 1; ++i) {\n            for(int j = 1; j < n - 1; ++j) {\n                int temp = 0;\n\n                for(int k = i - 1; k <= i + 1; ++k) {\n                    for(int l = j - 1; l <= j + 1; ++l) {\n                        temp = max(temp, grid[k][l]);\n                    }\n                }\n\n                grid[i - 1][j - 1] = temp;\n            }\n        }\n\n        grid.resize(n - 2);\n        for (int i = 0; i < grid.size(); ++i) {\n            grid[i].resize(n - 2);\n        }\n\n        return grid;\n    }\n};\n```
['Array', 'Matrix', 'C++']