What is the return value of fibonacci(5) in the following recursive implementation?
public static int fibonacci(int n) {
if (n <= 1) return n;
else return fibonacci(n-1) + fibonacci(n-2);
}
What is the return value of fibonacci(5) in the following recursive implementation?
public static int fibonacci(int n) {
if (n <= 1) return n;
else return fibonacci(n-1) + fibonacci(n-2);
}