💯JAVA Solution Explained in HINDI
https://youtu.be/8oOjpEJJax4\n\nFor explanation, please watch the above video and do like, share and subscribe the channel. \u2764\uFE0F Also, please do upvote 
https://youtu.be/8oOjpEJJax4\n\nFor explanation, please watch the above video and do like, share and subscribe the channel. \u2764\uFE0F Also, please do upvote the solution if you liked it.\n\n# Subscribe:- [ReelCoding](https://www.youtube.com/@reelcoding?sub_confirmation=1)\n\nSubscribe Goal:- 400\nCurrent Subscriber:- 359\n\n# Complexity\n- Time complexity: O(n^2)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(n^2)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int[][] largestLocal(int[][] grid) {\n        \n        int n = grid.length;\n\n        int maxLocal[][] = new int[n-2][n-2];\n\n        for(int i = 0; i < n - 2; i++) {\n            for(int j = 0; j < n - 2; j++) {\n                maxLocal[i][j] = findMax(grid, i, j);\n            }\n        }\n        return maxLocal;\n    }\n\n    private int findMax(int grid[][], int x, int y) {\n        int maxEle = 0;\n        for(int i = x; i < x + 3; i++) {\n            for(int j = y; j < y + 3; j++) {\n                maxEle = Math.max(maxEle, grid[i][j]);\n            }\n        }\n        return maxEle;\n    }\n}\n```
['Java']