Pregunta de entrevista de Amadeus

problem solving like arrays manipulations by efficiency