What is the concept of recursion in programming?
Any one tell me an explanation of recursion, where a function calls itself, and examples of its use in solving problems.
Any one tell me an explanation of recursion, where a function calls itself, and examples of its use in solving problems.
1 Answer
Umesh Sanjyal . 3 weeks ago
A programming concept where a function calls itself to solve smaller instances of the same problem or called itself inorder to solve the problem is called recursion .
When to Use Recursion: Solving problems that can be divided into similar smaller problems (like factorial, Fibonacci, tree traversals, etc.) When iterative solutions become too complex or lengthy