Pregunta de entrevista de HCLTech

Was asked to code an overiding example.