recursion
Recursion is a programming technique where a function calls itself to solve a problem. It breaks down complex tasks into smaller, more manageable parts. Each time the function calls itself, it works on a simpler version of the original problem until it reaches a base case, which stops the recursion.
A common example of recursion is calculating the factorial of a number, denoted as n!. The factorial of n is the product of all positive integers up to n. For instance, 5! equals 5 × 4 × 3 × 2 × 1, and this can be computed using a recursive function that calls itself with decreasing values of n.