Question d’entretien chez IBM

the mathematical problem, some coding questions