Recursion
1. Which of the following best describes a base case in recursion?
2. What is the output of the following recursive function call: factorial(3)?
function factorial(n) { if (n == 0) return 1; else return n * factorial(n-1); }
3. Which of the following is NOT a property of recursion?
4. In the context of recursion, what is a call stack overflow?
5. Which of the following problems is best solved using recursion?
6. What is the main advantage of tail recursion?
7. Which of the following recursive algorithms is used to solve the balancing weights problem?
8. Which of the following is true about the subset sum problem in recursion?
9. What is the main risk of using recursion without careful design?
10. Which of the following is NOT a typical use case for recursion?