Just Construct matrix and traverse diagonally!!!✌️🔥🔥
\n\n# Code\n\nclass Solution {\npublic:\n    string decodeCiphertext(string encodedText, int rows) {\n        int n=encodedText.size();\n        int c=n/rows;\n
\n\n# Code\n```\nclass Solution {\npublic:\n    string decodeCiphertext(string encodedText, int rows) {\n        int n=encodedText.size();\n        int c=n/rows;\n        vector<vector<char>>m(rows,vector<char>(c));\n        int k=0;\n        for(int i=0;i<rows;i++){\n            for(int j=0;j<c;j++){\n                m[i][j]=encodedText[k++];\n            }\n        }\n        string ans;\n        for(int k=0;k<c;k++){\n                int j=k;\n                int i=0;\n                while(i<rows && j<c){\n                    ans+=m[i][j];\n                    i++;\n                    j++;\n                }\n            }\n        bool f=true;\n        string s;\n        for(int i=ans.size()-1;i>=0;i--){\n            if(f && ans[i]==\' \'){\n               \n            }\n            else{\n                f=false;\n                s+=ans[i];\n            }\n        }\n        reverse(s.begin(),s.end());\n        return s;\n        \n    }\n};\n```
['String', 'Simulation', 'C++']