Question d’entretien chez Amazon

Recursion related question, easy to solve