✅ Easy C++ Solution
Code\n\nint findMax(vector<vector<int>>& grid,int i,int j)\n{\n    int maxi = INT_MIN;\n    for(int x=i;x<i+3;x++)\n    {\n        for(int y=j;y<j+3;y++)\n     
# Code\n```\nint findMax(vector<vector<int>>& grid,int i,int j)\n{\n    int maxi = INT_MIN;\n    for(int x=i;x<i+3;x++)\n    {\n        for(int y=j;y<j+3;y++)\n        {\n            maxi = max(maxi,grid[x][y]);\n        }\n    }\n    return maxi;\n}\n\nclass Solution {\npublic:\n    vector<vector<int>> largestLocal(vector<vector<int>>& grid) {\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            for(int j=0;j<n-2;j++)\n            {\n                int max = findMax(grid,i,j);\n                v[i][j] = max;\n            }\n        }\n        return v;\n    }\n};\n```
['C++']