Pregunta de entrevista de Simba Technologies

One simple algorithm question having to do with array manipulation.