Pregunta de entrevista de Picnic

Resolve a logical question regarding optimising processes etc