C++ solution 90% solution
\nclass Solution {\npublic:\n    vector<vector<int>> allCellsDistOrder(int rows, int cols, int rCenter, int cCenter) {\n        vector<pair<int,pair<int,int>>> 
```\nclass Solution {\npublic:\n    vector<vector<int>> allCellsDistOrder(int rows, int cols, int rCenter, int cCenter) {\n        vector<pair<int,pair<int,int>>> v;\n        for(int i=0;i<rows;i++){\n            for(int j=0;j<cols;j++){\n                int dist=abs(i-rCenter) + abs(j-cCenter);\n                v.push_back(make_pair(dist,make_pair(i,j)));\n            }\n        }\n        sort(v.begin(),v.end());\n        vector<vector<int>> vect(rows*cols, vector<int> (2,0));\n        for(int i=0;i<v.size();i++){\n            vect[i][0]=(v[i].second.first);\n            vect[i][1]=(v[i].second.second);\n        }\n        return vect;\n    }\n};\n```\nPlease upvote!
[]