Recursion
A technique in which a method calls itself with a smaller version of the problem.
What is Recursion in C#?
Recursion — A technique in which a method calls itself with a smaller version of the problem.
class Countdown
{
int Count(int number)
{
if (number == 0)
{
return 0;
}
return 1 + Count(number - 1);
}
}
Level: Apprentice · More C# terms at this level
Updated