1. What is the best definition of a recursive function?
2. On what line is the 'recursive call' taking place in the following code?
3. Can you trace the output of the following recursive function? What number is returned?
4. The following function 'moose', when run, results in a "Maximum call stack size" error. Can you explain why?
5. Running this function will cause an error. What needs fixing?
6. What is the output of this function?
7. The following recursive function will result in an error. Why?
8. Note the two functions for the Fibonacci sequence below. Which one is recursive?
9. Recursion is very beneficial when the iterative solutions requires that you simulate recursion with a stack. Recursion acknowledges that the compiler already manages a stack to accomplish precisely what you need. A disadvantage of recursion is:
10. Recursion could mean redefining something in terms of itself usually at some smaller scale, perhaps multiple times, to achieve your objective. Think of it like this: Recursive functions can ...