+ 5
check out the essentials of recursive vs iteration! (beginners)
What is recursion? well, it is a function calling itself, with a base case to 'break' the function. Why favor it over iteration? there was a saying that all recursive function can be written again as iteration. Although i am not that experienced, let me share a lil about this topic, using two simple functions, factorial and fibonacci. https://code.sololearn.com/cVd6PwabnLP5/#cpp
2 Réponses
+ 1
recursion means function calling itself