ZS Associates interview question

Based on case study