Recursion Types and Limit

Learn about the usage of different types of recursion.

Types of recursion

There are two types of recursions:

  • Head recursion
  • Tail recursion

Head recursion

In this type of recursion, the recursive call is made before other processing in the function, as shown below:

Get hands-on with 1400+ tech skills courses.