✅ One Line Solution
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)\n\n# Code #1\nTime complexity: O(n^2). Space comple
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)\n\n# Code #1\nTime complexity: $$O(n^2)$$. Space complexity: $$O(n^2)$$.\n```\nclass Solution:\n    def largestLocal(self, g: List[List[int]]) -> List[List[int]]:\n        return [[max(max(r[j:j+3]) for r in g[i:i+3]) for j in range(len(g)-2)] for i in range(len(g)-2)]\n```\n\n# Code #2\nTime complexity: $$O(n^2)$$. Space complexity: $$O(n^2)$$.\n```\nclass Solution:\n    def largestLocal(self, g: List[List[int]]) -> List[List[int]]:\n        return [[max(g[i+p][j+q] for p,q in product(*[(0,1,2)]*2)) for j in range(len(g)-2)] for i in range(len(g)-2)]\n```\n\n(Disclaimer 2: all code above is just a product of fantasy, it is not claimed to be pure impeccable oneliners - please, remind about drawbacks only if you know how to make it better. PEP 8 is violated intentionally)
['Matrix', 'Python', 'Python3']