Recursion
Updated 2026-07-28
Summary
Recursion, also translated as recursion, in mathematics and computer science, refers to a method where the definition of a function uses the function itself. The term recursion is also commonly used to describe the process of repeating things in a self-similar manner. For example, when two mirrors are approximately parallel to each other, the nested images in the mirrors appear as infinite recursion. It can also be understood as a process of self-replication.
Definition
Recursion, also translated as recursion, in mathematics and computer science, refers to a method where the definition of a function uses the function itself. The term recursion is also commonly used to describe the process of repeating things in a self-similar manner. For example, when two mirrors are approximately parallel to each other, the nested images in the mirrors appear as infinite recursion. It can also be understood as a process of self-replication.
Introduction
How to use
Recursion, also translated as recursion, in mathematics and computer science, refers to a method where the definition of a function uses the function itself. The term recursion is also commonly used to describe the process of repeating things in a self-similar manner. For example, when two mirrors are approximately parallel to each other, the nested images in the mirrors appear as infinite recursion. It can also be understood as a process of self-replication.
Mechanism
A function or procedure calls itself, reducing the problem to smaller subproblems of the same type until reaching a base case.
Practice
In progress 0/1Practice this model in one real situation:
Cases
- Factorial calculation, tree traversal.
Common pitfalls
- Lack of a base case leads to infinite recursion.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E9%80%92%E5%BD%92verified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.