29 ms·
> I can't think of a scenario where recursion results in a faster algorithm than an iterative form. I'd wager, but can't measure at the moment, that any code t
by Jtsummers 11y ago
> I can't think of a scenario where recursion results in a faster algorithm than an iterative form.
I'd wager, but can't measure at the moment, that any code that requires a stack when transforming it from recursive form to iterative form would be faster leaving it in its recursive form in most languages. But I have no idea what percentage of problems that would even pertain to that programmers run into.