Question d’entretien chez Beyondsoft Group

Basic recursion problem - was asked to dry-run it.