Amazon Interview Question

the testing problem