Infosys Interview Question

Coding question is difficult but technical is easy.