c++ solution | Easy understanding | BruteForce
\nclass Solution {\npublic:\n    vector<vector<int>> largestLocal(vector<vector<int>>& grid) \n    {\n        vector<vector<int>>ans(grid.size()-2,vector<int>(g
```\nclass Solution {\npublic:\n    vector<vector<int>> largestLocal(vector<vector<int>>& grid) \n    {\n        vector<vector<int>>ans(grid.size()-2,vector<int>(grid.size()-2));\n\n        for(int i=0;i<(grid.size()-2);i++)\n        {\n           for(int j=0;j<(grid.size()-2);j++)\n           {\n              int ele=getmax(grid,i,j);\t\n              ans[i][j]=ele;\n           }\t\n        }        \n        return ans;    \n    }\n    int getmax(vector<vector<int>>&grid,int row,int col)\n    {\n         int temp=INT_MIN;\n         for(int i=row;i<row+3;i++)\n         {\n            for(int j=col;j<col+3;j++)\n            {\n              temp=max(temp,grid[i][j]);\t\n            }\n         }\n         return temp;\n   }\n};\n```
['C', 'C++']