Pregunta de entrevista de Amazon

Debugging test followed by a coding test