0
what is the characteristic of recursion?
1. One or more simple cases.
2 Réponses
+ 5
Recursion is when a function calls itself, inside itself. Kind of confusing to think of it. Kinda like a neverending downward spiral that only ends when it reaches an exit condition
While its a little bit confusing, it can be used to simply solve a bunch of problems, the most popular of which is the Factorial
https://code.sololearn.com/cR5vZ2Im19DB/?ref=app
+ 1
In simple words, it's a function calling itself. You can refer to some famous recursion cases : factorial numbers and Fibonacci number