check out the essentials of recursive vs iteration! (beginners) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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

14th Aug 2017, 1:56 AM
Veii Xhen
Veii Xhen - avatar
2 Answers
+ 1
recursion means function calling itself
17th Aug 2017, 8:23 AM
Onkar khurd
Onkar khurd - avatar