4 Dec 2018: Recursive Fibonacci Sequence

  • Implement Fibonacci Sequence with a recursive function

  • Team programming:

    • Pilot: Implement, typing

    • Navigator: Break up problem

    • Secretary: Search, documentation, error-checking

6 Dec 2018: Divide and Conquer

  • Decide as a group whether to share a repl.it or use one repl.it per person.

  • Please fork the following repl.it:

  • Review and test the program

  • Modify the definition of rmax() to print output every time it is called.

    • How many times is rmax() called for a vector of length 10?

    • Of length 20?

6 Dec 2018 (B): Factorial

  • Write a recursive function that takes an integer, returns and integer, and computes the factorial of its argument, i.e., x!.

  • Write a program that calls your function with 4, 6, and 10.

  • Modify your function to print output every time it’s called.

    • How many total times is your function called to compute 10!?

  • Submission Form