basic algorithm interview questions 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);
}