Amazon Interview Question

Not interview, just the test