• The key question of recursion is in which cases is it the best approach ?

    I remember the infamous factorial example - convenient to use to explain recursion in this very simple case. But often no warning given that this is the most inefficient way of calculating factorials. In fact, given the overhead involved, it is downright stupid to use recursion for factorials.

    So when is the overhead warranted ?