Amazon Interview Question

Debugging test followed by a coding test