Easy Solution ✅
\nclass Solution {\n    public int[][] largestLocal(int[][] grid) {\n        int n = grid.length;\n        int maxLocal[][] = new int[n-2][n-2];\n        for(in
```\nclass Solution {\n    public int[][] largestLocal(int[][] grid) {\n        int n = grid.length;\n        int maxLocal[][] = 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                maxLocal[i][j] = maxFind(grid,i,j);\n            }\n        }\n        return maxLocal;\n    }\n    private int maxFind(int arr[][], int i_Start, int j_Start){\n        int max = Integer.MIN_VALUE;\n        for(int i=i_Start; i<i_Start+3; i++){\n            for(int j=j_Start; j<j_Start+3; j++){\n                max = Math.max(max,arr[i][j]);\n            }\n        }\n        return max;\n    }\n}\n/*\n[[9,9,8,1],\n [5,6,2,6],\n [8,2,6,4],\n [6,2,2,2]]\n \n \n so in that we need do see only 3 * 3 at one time.\n \n  9 9 8 = 3\n  5 6 2\n  8 2 6  = 3 \n  its 3*3 ok so. in that. 9 is big.\n  \n  now col +1; \n  9 8 1 = 3\n  6 2 6 \n  2 6 4 = 3.\n  its also 3 * 3 in that 9 is max.\n  \n  now row + 1;\n   5 6 2\n   8 2 6\n   6 2 2 \n   in that 8 is max.\n   now col +1;\n   6 2 6\n   2 6 4\n   2 2 2 \n   so in that 6 is max.\n   \n   so now u can see. matrix is n-2 length was 4 , its 2 length; \n   9 9\n   8 6.\n\n```
['Java']