Hi I have a homework question that needs some clarifications,
1.
public int f (int n) {
if (n < 0)
return 2;
else
return f (n - 1) + f (n - 3);
}
what is the value when the recall is f(3) I know that this loops so
f(3) = f(2)+2
= f(1)+2+2
= f(0)+2+2+2
= 8
but I'm not sure if Java considers 0 less than 0.