Recursion
- A function that call itself until a problem is solved. The point at which the problem is solved is called base case.
- It’s good to think about function calls as a stack. Even the segment of memory that is used for function calls is also called stack.
- Recursion can be broken down into three steps:
- Pre: Operations before recursion.
- Recursion: The function call.
- Post: Operations after recursion.