Quiz · Algorithms and Complexity · lesson 6 of 9
Quiz — the base case of recursion
Which line, added at the top of factorial, makes factorial(3) return 6?
int factorial(int n) {
return n * factorial(n - 1);
}Which line, added at the top of factorial, makes factorial(3) return 6?
int factorial(int n) {
return n * factorial(n - 1);
}