HCLTech interview question

Extempore