It is an interview question. The input is an ArrayList. My first idea is to convert it into a 2D matrix and then combine each column, but it seem like not the right answer. Is there any other way to solve this? Thanks.
Input
"abc",
"bef",
"g"
Expected Output (first column, abg
, then the second column, be
and finally the third column, cf
):
"abgbecf"