ZS Associates interview question

work in case study so no problem in solving case study