Very Easy Solution || Beat 100% ||Beginner Friendly
Intuition\nThe problem seems to involve finding the largest local value within a grid by considering 3x3 subgrids\n\n# Approach\nThe approach seems to iterate t
# Intuition\nThe problem seems to involve finding the largest local value within a grid by considering 3x3 subgrids\n\n# Approach\nThe approach seems to iterate through each position (i, j) in the grid and for each position, iterate over the 3x3 subgrid starting from (i, j). Within this subgrid, find the maximum value and store it in the maxl array.\n\n# Complexity\n- Time complexity:\n $$O(n^2)$$ \n\n- Space complexity:\n $$O(n^2)$$ \n\n# Code\n```\nclass Solution {\n    public int[][] largestLocal(int[][] grid) {\n        int n=grid.length;\n        int m=n-2;\n        int [][]maxl=new int[m][m];\n        int max=0;\n        \n        for(int i=0;i<m;i++)\n        {\n            for(int j=0;j<m;j++)\n            {\n                max=0;\n                for(int k=i;k<i+3;k++)\n                {\n                    for(int l=j;l<j+3;l++){\n                        max=Math.max(max,grid[k][l]);\n                    }\n\n                }\n                maxl[i][j]=max;\n            }\n        }\n        return maxl;\n\n        \n    }\n}\n```
['Array', 'Java']