Pregunta de entrevista de RBC

the second question was 2D array matrix analysis