0%
0 / 8 answered

Recursion Practice Test

8 Questions
Question
1 / 8
Q1

For factorial(5) below, how many recursive calls are made before the base case returns?


int factorial(int n) {

  if (n <= 1) return 1;      // base case

  return n * factorial(n-1); // recursive case

}

```​

Question Navigator