Infosys Interview Question

I did not pass the coding test so no interview.