Question d’entretien chez Datadog

Solve a classic recursion problem, then come up with a non recursive solution.