Pregunta de entrevista de Data-Core Systems

transform 2d array into array of provided dimension