Home / Questions / What is recursion?
Explanatory Question

What is recursion?

👁 3 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

A method calling itself to solve a problem.


int fact(int n) {
    if(n == 1) return 1;
    return n * fact(n - 1);
}