Pregunta de entrevista de Mobile Programming

Coding question to flatten array.