Recursion
Recursion in definition is defining something in terms of itself.
It has very simple logic but it's running time is long.
Recursion is usually used in stacks and when the stack is too large, it might raise stack overflow error.
If there is no exit condition, the recursion code will run infinitely so it is very important to assign exit condition.
No comments:
Post a Comment