Pregunta de entrevista de Infosys

Coding question is difficult but technical is easy.