Question d’entretien chez IBM

what's wrong this code (on dynamic programming)