c++ || easy
\nclass Solution {\npublic:\n    int solve(int r,int c,vector<vector<int>>& grid){\n        int maxi=0;\n        for(int i=-1;i<=1;i++){\n            for(int j=
```\nclass Solution {\npublic:\n    int solve(int r,int c,vector<vector<int>>& grid){\n        int maxi=0;\n        for(int i=-1;i<=1;i++){\n            for(int j=-1;j<=1;j++){\n                int row=r+i,col=c+j;\n                maxi=max(grid[row][col],maxi);\n            }\n        }\n        return maxi;\n    }\n    vector<vector<int>> largestLocal(vector<vector<int>>& grid) {\n        int n=grid.size();\n        vector<vector<int>> ans(n-2,vector<int>(n-2,0));\n        for(int i=0;i<n-2;i++){\n            for(int j=0;j<n-2;j++){\n                ans[i][j]=solve(i+1,j+1,grid);\n            }\n        }\n        return ans;\n    }\n};\n```
['C']