Amazon interview question

I had a test to do