>>20
from wikipedoia In computer science, tail recursion (or tail-end recursion) is a special case of recursion in which the last operation of the function is a recursive call. Such recursions can be easily transformed to iterations. Replacing recursion with iteration, either manually or automatically, can drastically decrease the amount of stack space used and improve efficiency. This technique is commonly used with functional programming languages, where the declarative approach and explicit handling of state promote the use of recursive functions that would otherwise rapidly fill the call stack.
i said no i'm a really really EXPERT C PROGRAMMER and fluent in x86 and MIPS asm, and recursion sucks.
if you don't get it now you're a sad fuck
Name:
Anonymous2007-07-17 5:05 ID:jsRmPBPh
I don't get it.
Name:
Anonymous2007-07-17 5:22 ID:EG1zhSKl
>>18
Truth, with the added penalty that this vector may take more RAM than the call stack depending on its implementation and what you store in it. In any case, it's either tail call, which can run in O(1) space, or it runs in O(n) space - just like the iterative version, only much simpler to think and write.