Pregunta de entrevista de Cognizant

Medium level coding questions which were all technical.