Pregunta de entrevista de Goldman Sachs

LC easy and debugging (fix some logical errors in the question)