HCLTech Interview Question

Scripting interview was little difficult as I am bad in coding.