HCLTech interview question

Technical question for first two rounds