Amazon interview question

Debugging test followed by a coding test