تخطّى إلى المحتوى
عودة إلى المسرد

[AR] Recursion

التّعريف

[AR] A function that calls itself to solve a smaller version of the same problem.

مثال

[AR] factorial(n) = n * factorial(n-1) until factorial(0) = 1.