Beats 98%
Upvote it :)\n\nclass Solution:\n    def allCellsDistOrder(self, rows: int, cols: int, rCenter: int, cCenter: int) -> List[List[int]]:\n        d, res = default
# Upvote it :)\n```\nclass Solution:\n    def allCellsDistOrder(self, rows: int, cols: int, rCenter: int, cCenter: int) -> List[List[int]]:\n        d, res = defaultdict(list), []\n        for i in range(rows):\n            x = abs(i - rCenter)\n            for j in range(cols):\n                dist = x + abs(j - cCenter)\n                d[dist].append([i, j])\n        for i in sorted(d): res += d[i]\n        return res\n\n```
['Python', 'Python3']