Rotating the Box-Brute Force approach using java easily understandable
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n \n# Complexity\n- Time
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n \n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n$$O(n*m*n)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n$$O(n*m)$$\n# Code\n```java []\nclass Solution {\n    public char[][] rotateTheBox(char[][] box) {\n        for(int i=0;i<box.length;i++){\n            boolean changed=true;\n            while(changed){\n                changed=false;\n                for(int j=0;j<box[0].length-1;j++){\n                    if(box[i][j]==\'*\' || box[i][j+1]==\'*\'){\n                        continue;\n                    }\n                    if(box[i][j]==\'#\' && box[i][j+1]==\'.\'){\n                        char temp=box[i][j];\n                        box[i][j]=box[i][j+1];\n                        box[i][j+1]=temp;\n                        changed=true;\n                        break;\n                    }\n                }\n            }       \n        }\n        char[][] ans=new char[box[0].length][box.length];\n        int start=0;\n        for(int i=box.length-1;i>=0;i--){\n            \n            for(int j=0;j<box[0].length;j++){\n                ans[j][start]=box[i][j];\n                \n            }\n            start++;\n        }\n        return ans;\n    }\n}\n```
['Java']