I need a little help on figuring out the Big-Theta running time for this function.
int recursive(int n) {
sum = 0;
for (int i = 1; i <= n; i++)
sum++
if (n > 1)
return sum + recursive(n-1);
else
return n;
}
I know how what the run time of this function would be if the for loop wasn't in the function, but the loop is throwing me off a little bit. Any advice?