Easy to Understand | Clean code
\nclass Solution {\n    public int[][] largestLocal(int[][] grid) {\n        int n=grid.length;\n        int ans[][]=new int[n-2][n-2];\n        for(int i=0;i<n
```\nclass Solution {\n    public int[][] largestLocal(int[][] grid) {\n        int n=grid.length;\n        int ans[][]=new int[n-2][n-2];\n        for(int i=0;i<n-2;i++){\n            for(int j=0;j<n-2;j++){\n                int max=0;\n                for(int ii=i;ii<=i+2;ii++){\n                    for(int jj=j;jj<=j+2;jj++){\n                        // System.out.println(ii+" "+jj);\n                        max=Math.max(grid[ii][jj],max);\n                    }\n                }\n                ans[i][j]=max;\n            }\n        }\n        return ans;\n    }\n}\n```
['Java']