easy peasy
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\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * @param {string} encodedText\n * @param {number} rows\n * @return {string}\n */\nvar decodeCiphertext = function (encodedText, rows) {\n    let cols = encodedText.length / rows;\n    let matrix = new Array(rows).fill(0).map((_, r) => new Array(cols).fill(0).map((_, c) => encodedText.charAt(r * cols + c)))\n    let x = 0; y = 0;\n    let decipher = "";\n    let diag = 1;\n    while (diag <= matrix[0].length) {\n        if(matrix[x]&& matrix[x][y]!==undefined)decipher += matrix[x][y];\n        x++;\n        y++;\n        if(x>=matrix.length) {\n            y = diag;\n            diag++;\n            x = 0;\n        }\n    }\n    return decipher.trimEnd();\n};\n```
['JavaScript']