Pergunta de entrevista da empresa MEDRAD

What are the potential issues of using recursion?

Resposta da entrevista

Sigiloso

17 de jul. de 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.