Pregunta de entrevista de Cognizant

basic coding, logical reasoning and analysis