Pregunta de entrevista de Cognizant

they asked me to code