Domanda di colloquio di MEDRAD

What are the potential issues of using recursion?

Risposta di colloquio

Anonimo

17 lug 2015

I answered with the standard question of knowing when you stop, and the increased overhead of stack space, following up with the comment that, where possible, you usually wanted to unroll the recursion into a loop, even if it wasn't necessarily as elegant. They said that they were primarily looking for the stack space aspect of the question.