2 ms·
Thats not the point. I think it is possibly harmful to focus on recursion in teaching and interviews. (Of course if the understanding is, that you do not use it
by andi999 6y ago
Thats not the point. I think it is possibly harmful to focus on recursion in teaching and interviews. (Of course if the understanding is, that you do not use it in real life, then its ok, but still why not test people on skills they need for the job; its like making people jump through hoops for a swimmers position).
Of course I will be embarressed soon, when it is only me who doesnt use recursion in production. :-)
- creata 6y agoI don't know what goes on in the minds of interviewers, but if I had to guess, they use recursion to test the interviewee's ability to reason inductively --- which, of course, is necessary for writing even simple loops. Maybe a question about loop invariants might be a good replacement. Regardless, yes, I doubt many people write a lot of recursive functions, since the data structures people use tend to either be flat, based on arrays, or neatly hidden away in libraries.
- andi999 6y agoThe data structures people use are choosen by people. So it is a choice to have flat datastructures (probably by people how see the diadvantages of recursion)