JS simple solution | Easy to Understand
\nvar decodeCiphertext = function(encodedText, rows) {\n    if(encodedText.length == 0)\n        return ""\n    var mat= [];\n    var n=(encodedText.length/rows
```\nvar decodeCiphertext = function(encodedText, rows) {\n    if(encodedText.length == 0)\n        return ""\n    var mat= [];\n    var n=(encodedText.length/rows);\n    var temp = [];\n    for(var i=0, c=1; i<encodedText.length; i++, c++)\n        {\n            temp.push(encodedText[i]);\n            if(c == n)\n                {\n                    mat.push(temp);\n                    c=0;\n                    temp = [];\n                }\n        }\n    var output = "";\n    for(var i=0; i<mat[0].length; i++)\n        {\n            var r=0, c=i;\n            while(r<mat.length && c<mat[0].length)\n                {\n                    output+=mat[r++][c++];\n                }\n        }\n    return output.trimEnd();\n};\n```
['JavaScript']