Recursion (computer science): Difference between revisions

Content deleted Content added
m Reverted 1 edit by 95.57.219.226 (talk) to last revision by Neuteche
Order of execution: output lines are swapped, not 'function lines' (whatever the latter might be in a pgm. lang. where layout is non-essential)
Line 390:
[[Image:Recursive2.svg|350px]]
 
FunctionThe output of function 2 is that of function 1 with the lines swapped.
 
In the case of a function calling itself only once, instructions placed before the recursive call are executed once per recursion before any of the instructions placed after the recursive call. The latter are executed repeatedly after the maximum recursion has been reached.