Amazon Interview Question

Test on logical reasoning