Pregunta de entrevista de Amazon

Correct some bug in the first OA, write code in second OA