Amazon interview question

Technical only