Amazon interview question

Not interview, just the test