HCLTech interview question

Related to algorithms and DSA