rekursija
Rekursija is a method of solving problems by repeatedly applying the same procedure to smaller instances of the same problem. In rekursija, a function or process calls itself, typically with a simpler input, and stops when a base case is reached. Each recursive step reduces the problem toward that base case.
The term originates from Latin recursio and is widely used in mathematics and computer science. In rekursija,
A classic example is the factorial function. For a non-negative integer n, factorial(n) is defined as 1
Advantages of rekursija include concise, natural representations of hierarchical and divide-and-conquer problems, such as tree traversals
In programming, rekursija is closely related to recursive data structures (such as lists and trees) and to