Amazon interview question

hypothetical case study