Recursion
Recursion is a programming technique where a function calls itself to solve a problem by breaking it down into smaller, more manageable sub-problems. This approach is particularly useful for tasks that can be defined in terms of similar subtasks, such as calculating factorials, traversing tree structures, or implementing algorithms like quicksort and mergesort.
A recursive function typically includes a base case that defines when the recursion should stop, preventing infinite loops and allowing for a clear solution. Through recursion, complex problems can often be solved with concise and readable code, highlighting the power of self-reference in programming.