HCLTech interview question

No difficulty