Pregunta de entrevista de LuxuryEscapes

Resolve an algorithm to improve performance