4 ms·
Would that really happen though? I don't think I would actually release recursive code. I find recursion to be very simple and elegant for prototyping algos, b
by Galanwe 5y ago
Would that really happen though? I don't think I would actually release recursive code.
I find recursion to be very simple and elegant for prototyping algos, but I would instinctively rewrite it with an iterative/queue form as soon as the "toy" stage is over.
- int_19h 5y agoBut why would you do that, if it's simple and elegant? Really the only answer is that it has potentially unbounded stack consumption - but tail recursion solves exactly that problem.