Amazon interview question

Case study not very difficult