Brutal Force
Java\njava\npublic int[][] largestLocal(int[][] grid) {\n        int[][] result = new int[grid.length - 2][grid.length - 2];\n\n        for (int i = 0; i < resu
#### Java\n```java\npublic int[][] largestLocal(int[][] grid) {\n        int[][] result = new int[grid.length - 2][grid.length - 2];\n\n        for (int i = 0; i < result.length; ++i) {\n            for (int j = 0; j < result.length; ++j) {\n\t\t\t\n                int largest = Integer.MIN_VALUE;\n                for (int row = i; row < i + 3; ++row) {\n                    for (int column = j; column < j + 3; ++column) {\n                        largest = Math.max(largest, grid[row][column]);\n                    }\n                }\n                result[i][j] = largest;\n            }\n        }\n        return result;\n    }\n```\n\n#### C++\n\n```c++\nvector<vector<int>> largestLocal(vector<vector<int>>& grid) {\n        vector<vector<int>> result(grid.size() - 2, vector<int>(grid.size() - 2));\n\n        for (int i = 0; i < result.size(); ++i) {\n            for (int j = 0; j < result.size(); ++j) {\n\t\t\t\n                int largest = INT_MIN;\n                for (int row = i; row < i + 3; ++row) {\n                    for (int column = j; column < j + 3; ++column) {\n                        largest = max(largest, grid[row][column]);\n                    }\n                }\n                result[i][j] = largest;\n            }\n        }\n        return result;\n    }\n```\n\nMy repositories with leetcode problems solving - [Java](https://github.com/FLlGHT/algorithms/tree/master/j-algorithms/src/main/java),  [C++](https://github.com/FLlGHT/algorithms/tree/master/c-algorithms/src/main/c%2B%2B)
['C', 'Java']