algorithm questions for beginners code example
Example: algorithm questions for beginners
unsigned fun(unsigned n)
{
if (n == 0) return 1;
if (n == 1) return 2;
return fun(n-1) + fun(n-1);
}
unsigned fun(unsigned n)
{
if (n == 0) return 1;
if (n == 1) return 2;
return fun(n-1) + fun(n-1);
}