C# One line solution
\npublic class Solution {\n    public int[][] AllCellsDistOrder(int R, int C, int r0, int c0) => Enumerable.Range(0,R*C).Select(i=>new int[]{i/C,i%C}).OrderBy(x
```\npublic class Solution {\n    public int[][] AllCellsDistOrder(int R, int C, int r0, int c0) => Enumerable.Range(0,R*C).Select(i=>new int[]{i/C,i%C}).OrderBy(x=> Math.Abs(x[0]-r0)+Math.Abs(x[1]-c0)).ToArray();\n}\n```
[]