Ruby
Intuition\nDescription is confusiong. I recommend lookign at the examples and understanding what the decding algorithm should look like. When you have questions
# Intuition\nDescription is confusiong. I recommend lookign at the examples and understanding what the decding algorithm should look like. When you have questions about edge case you can then look at description for clarifications.\n\n# Approach\n\nFunction would be\n\n> decoded_char = encoded_text[(row_num * total_cols) + (row_num + col_num)]\n\n# Complexity\n- Time complexity: $$O(n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(n)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n# @param {String} encoded_text\n# @param {Integer} rows\n# @return {String}\ndef decode_ciphertext(encoded_text, rows)\n  cols = encoded_text.length / rows\n  answer = []\n\n  0.upto(cols-1).each do |col|\n    0.upto(rows-1).each do |row|\n      xrow = row\n      xcol = row + col\n\n      next if xcol > cols-1\n\n      answer << encoded_text[(xrow * cols) + xcol]\n    end\n  end\n\n  answer.join.rstrip\nend\n```
['Ruby']