Pregunta de entrevista de Cognizant

Technical was on coding. Pseudo code in any language