WNS interview question

Technical