Pregunta de entrevista de Cyberhaven

Small code optimization challenge on Engineering screening.