4 ms·
My two cents: I think it's because understanding recursion involves a good understanding of a bunch of stuff. You have to know about the different scopes of va
by dragos2 14y ago
My two cents:
I think it's because understanding recursion involves a good understanding of a bunch of stuff. You have to know about the different scopes of variables (global, local), how the variables are stored, how does a stack work, etc.
It also challenges you to understand why it's not a good idea to use recursion and to find an iterative solution to your problem.
Most interviewers like to cover more areas with one question.