15.12.2014, 17:40
Recursion in Computer science is quit classical concept, in which function with an argument calls itself. This approach is normally used in place of looping constructs, recursion also repeats itself and is having iterations just like loops, but in some cases you might find recursion useful. Many mathematical functions can be defined in recursive manner, for example Fourier Transform, Factorial, Euclid's greatest common denominator, Fibonacci series, etc.
But the thing that matters the most in recursion, is that you should have flag or you can say exit condition after which recursion should eventually stop, otherwise it will go on iterating up to infinity.
Now the thing which you should probably do is to find out which function is calling itself in recursive manner, then either add a exit condition after which recursion should terminate.
But the thing that matters the most in recursion, is that you should have flag or you can say exit condition after which recursion should eventually stop, otherwise it will go on iterating up to infinity.
Now the thing which you should probably do is to find out which function is calling itself in recursive manner, then either add a exit condition after which recursion should terminate.