Amazon interview question

Nothing too hard