self explaining easy C++ solution
\nclass Solution {\npublic:\n    vector<vector<char>> rotateTheBox(vector<vector<char>>& box) {\n        int m=box.size(),n=box[0].size();\n        vector<vecto
```\nclass Solution {\npublic:\n    vector<vector<char>> rotateTheBox(vector<vector<char>>& box) {\n        int m=box.size(),n=box[0].size();\n        vector<vector<char>> ans(n,vector<char>(m,\'.\'));\n        for (int i=0;i<m;i++)\n        {\n            int l=m-i-1,pos=n-1; // l is the relative column after rotating and pos is the row number where we should put the stone\n            for (int j=n-1;j>=0;j--)\n            {\n                if (box[i][j]==\'.\')\n                    continue;\n                else if (box[i][j]==\'*\')\n                {\n                    ans[j][l]=\'*\';\n                    pos=j-1;\n                }\n                else \n                {\n                    ans[pos][l]=\'#\';\n                    pos--;\n                }\n            }\n        }\n        return ans;\n    }\n};\n```
[]