Consider the following code:
public int result(int n) {
if (n == 1)
return 2;
else
return 2 * result(n - 1);
}
If n > 0, how many times will "result" be
called to evaluate "result(n)"?
n2^n2nn^2On each call, n is decremented by 1, until
it reaches 1 when it hits the base case.