Simple and Easy || Explained every steps
\nclass Solution {\npublic:\n    string decodeCiphertext(string encodedText, int rows) {\n        if(encodedText == "")return encodedText;    // base cases\n   
```\nclass Solution {\npublic:\n    string decodeCiphertext(string encodedText, int rows) {\n        if(encodedText == "")return encodedText;    // base cases\n        if(rows == 1) return encodedText;           // if rows = 1 simply return\n        \n        \n// create a mat matix where we store our encodedText lineraly row by row as shown in example\n        // mat\'s row = rows\n        // mat\'s col = encodedText.size() / rows\n        \n        vector<vector<char>> mat(rows, vector<char>(encodedText.size() / rows, \' \'));\n        int k = 0;\n        for(int i = 0; i < mat.size(); i++){\n            for(int j = 0; j < mat[i].size(); j++){\n                mat[i][j] = encodedText[k];\n                k += 1;\n            }\n        }\n        \n        \n        \n        string ret = "";\n        int i = 0;\n        int col = mat[0].size();\n        \n    // now traversing diagonally in mat matix to store answer in ret\n        while(i != col){\n            int temp_i = 0;\n            int temp_j = i;\n            while(temp_i < rows && temp_j < col){\n                ret += mat[temp_i][temp_j];\n                temp_i += 1;\n                temp_j += 1;\n            }\n            i += 1;\n        }\n        \n// erasing tralling space as there are the possibilities that we might find tralling spaces while traversing diagonally \n        \n        int last = ret.size() - 1;\n        while(ret[last] == \' \'){\n            ret.erase(ret.begin() + last);\n            last -= 1;\n        }\n        \n        return ret;  //returning the decoded string\n    }\n};\n```
['C', 'Simulation']