Python3 - Nasty 1 liner
\n# Complexity\n- Time complexity:\nO(nlogn) \n\n- Space complexity:\no(n)\n\n# Code\n\nclass Solution:\n    def allCellsDistOrder(self, rows: int, cols: int, r
\n# Complexity\n- Time complexity:\nO(nlogn) \n\n- Space complexity:\no(n)\n\n# Code\n```\nclass Solution:\n    def allCellsDistOrder(self, rows: int, cols: int, rCenter: int, cCenter: int) -> List[List[int]]:\n\n        return sorted(\n            [[r, c] for r in range(0, rows, 1) for c in range(0, cols, 1)],\n            key=lambda coord: abs(coord[0] - rCenter) + abs(coord[1] - cCenter),\n        )\n\n```
['Python3']