Recursion
Computer ScienceA technique where a function calls itself to solve a problem.
Recursion solves a problem by breaking it into smaller instances of the same problem, with a base case to stop. It is natural for tree traversals, divide-and-conquer algorithms, and problems with self-similar structure, though deep recursion risks stack overflow.