C++ || EASY TO SOLVE || WITH THE Explanation With written notes
If you like it please *up vote \u2B06\uFE0F***\n# Intuition\n Describe your first thoughts on how to solve this problem. \nJust go through the box matrix and ch
# ***If you like it please **up vote \u2B06\uFE0F*****\n# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nJust go through the box matrix and check wether the `\'*\'` obstcale is there or not \nthen make the stone count 0 after evey stone and then check the `\'#\'`\nif the following occure then make sure to increase the count of the `stone++` and then check for the updated stone after the stones are allocated to it right postions and then that `stone` will become the `newObstacle` and then just puch_back all the things in the `vector` of `char ` and then return the  following in the 90 degree rotated manner [\n\n\n     \n    for(int j=0;j<m;++j){\n        vector<char>ans;\n        for(int i=n-1;i>=0;--i){  \n            ans.push_back(box[i][j]);\n        }\n        rotateTheBox_ans.push_back(ans);\n    }\n    return rotateTheBox_ans;\n    }\n\n]\n\n# Code\n```\nclass Solution {\npublic:\n    vector<vector<char>> rotateTheBox(vector<vector<char>>& box) {\n        int n=box.size();\n        int m=box[0].size();\n        vector<vector<char>>rotateTheBox_ans;\n        for(int i=0;i<n;i++){\n//check for the obstacle of from the bottom of the box matrix\n            int stone=0,obstacle=m;\n            for(int j=m-1;j>=0;--j){\n                if(box[i][j]==\'*\'){\n                    obstacle=j;\n                    stone=0;\n                }\n                else if(box[i][j]==\'#\'){\n                    //the newObstcale will be from when the stone\n                    // it self is placed at the right position \n                    //then next stone will be upon the other stone\n                   int newObstcale=obstacle-stone-1;\n                   box[i][j]=\'.\';\n                   box[i][newObstcale]=\'#\';\n                   stone++; \n                }\n            }\n        }\n//rotate 90 degree \n    for(int j=0;j<m;++j){\n        vector<char>ans;\n        for(int i=n-1;i>=0;--i){  \n            ans.push_back(box[i][j]);\n        }\n        rotateTheBox_ans.push_back(ans);\n    }\n    return rotateTheBox_ans;\n    }\n};\n```\n![WhatsApp Image 2022-12-24 at 2.18.46 PM (2).jpeg](https://assets.leetcode.com/users/images/6333dfc6-9463-44c0-be20-a9eb1e462279_1671871871.740625.jpeg)\n![WhatsApp Image 2022-12-24 at 2.18.46 PM (1).jpeg](https://assets.leetcode.com/users/images/45c59915-ec8c-4b7e-bb26-ad8ffc49d775_1671871867.4435873.jpeg)\n![WhatsApp Image 2022-12-24 at 2.18.46 PM.jpeg](https://assets.leetcode.com/users/images/0045c4b9-54b6-4b17-bca7-6ce2a79bc144_1671871875.9215078.jpeg)\n\n![WhatsApp Image 2022-12-24 at 2.18.45 PM.jpeg](https://assets.leetcode.com/users/images/54465ef7-99e8-4c9e-9c91-6e2652b455e8_1671871856.1313772.jpeg)\n
['C++']