+ 1

Is it still recursion?

What if two functions call each other over and over... Is it still recursion? What can it be used for?

5th Dec 2018, 8:56 AM
David van Staden
David van Staden - avatar
3 Respuestas
+ 6
I only know recursion function means a function that calls itself rather than calling another. Probably circular dependency, function A needs function B, and so does the other way around. Without the pair either one can work. Your sub question is vague as you asked "What can it be used for?", did you mean recursion function, or functions that calls each other?
5th Dec 2018, 9:33 AM
Ipang
+ 6
Yes, it's called indirect or mutual recursion. You can find details with example here: https://en.m.wikipedia.org/wiki/Mutual_recursion
5th Dec 2018, 9:55 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 2
Check this post how actually recursion work. https://www.sololearn.com/discuss/1149517/?ref=app
5th Dec 2018, 2:57 PM
Maninder $ingh
Maninder $ingh - avatar