Company: CodeSignal

Difficulty: medium

Problem Statement

Rhombic Cipher You are given a `2n × n` table of lowercase characters. The rhombic-cipher construction described in the source is equivalent to reading, for each column from left to right, all odd-indexed rows from top to bottom and then all even-indexed rows from top to bottom. Indices are 0-based. Print the resulting `2n × n` table. Input The first line contains `r c`, where `r` is even. The next `r` lines contain `c` single-character tokens separated by spaces. Output Print `c` lines, each containing `r` space-separated characters. Example For rows `abc`, `def`, `ghi`, `jkl`, `mno`, `pqr`, output rows are `d j p`, `a g m`, `e k q`, `b h n`, `f l r`, `c i o`.

More CodeSignal OA questionsInterview experiences