Simple C++ solution || Easy
Complexity\n- Time complexity:\nO (n x m)\n- Space complexity:\nO (n x m)\n\n# Code\ncpp []\nclass Solution {\npublic:\n    vector<vector<char>> rotateTheBox(ve
# Complexity\n- Time complexity:\nO (n x m)\n- Space complexity:\nO (n x m)\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    vector<vector<char>> rotateTheBox(vector<vector<char>>& box) {\n        int row = box.size(), col = box[0].size();\n        \n        for(int i = 0 ;i < row ;i++){    \n            int last = col-1;\n\n            for(int j = col - 1 ;j >= 0 ;j--){\n                if(box[i][j] == \'*\'){\n                    last = j-1;\n                }\n                else if(box[i][j] == \'#\'){\n                    box[i][j] = \'.\';\n                    box[i][last] = \'#\';\n                    last--;\n                }\n            }\n        }\n\n        vector<vector<char>> ans;\n        for(int j = 0 ;j < col ;j++){\n            vector<char> temp;\n\n            for(int i = row-1 ;i >= 0 ;i--)\n            temp.push_back(box[i][j]);\n\n            ans.push_back(temp);\n        }\n        \n        return ans;\n    }\n};\n```
['Matrix', 'C++']