The algorithm being used in the problem To and Fro

need to know how the one dimensional string array is converted into double dimensional array.