ZS Associates interview question

Solve a case problem