3 ms·
Normal recursion is just a loop and a stack, turns out, if you can optimize recursion without a stack, it just becomes a loop.
by wagwang 1y ago
Normal recursion is just a loop and a stack, turns out, if you can optimize recursion without a stack, it just becomes a loop.
- Mikhail_Edoshin 1y agoIt is still the same stack, but it reuses the existing stack frame.