Pregunta de entrevista de Meta

Basic question about array manipulation.