Pregunta de entrevista de Infosys

Programming Question was asked in the interview