Amazon interview question

Case Study question