rekursionen
Rekursionen is a concept in mathematics and computer science describing processes or definitions that refer to themselves. In a recursive definition, a base case provides a simple, non-recursive value, and a recursive clause expresses how to obtain other values from already defined ones. In programming, a function is recursive if it calls itself during execution.
Common forms include structural recursion (defined by the structure of a data type, such as lists or
Examples: factorial n! = n × (n-1)!, with base case 0! = 1; Fibonacci sequence F(n) = F(n-1) + F(n-2)
Termination and complexity: a well-defined rekursion must terminate; otherwise it may lead to infinite recursion and
Applications: algorithms on trees, graph traversals, parsing, and dynamic programming with memoization to avoid recomputation. Rekursion