1. Monday, 10/5/2009 Notes

    In lecture today the following topics were covered:

    • a program that exhibits infinite recursion, causing a stack overflow error
    • the definition of tail recursion and a discussion of the potential benefits of tail recursion
    • examples of re-writing two recursive methods using tail recursion - fibonacci, factorial
    • discussion of how tail-recursive methods can be translated fairly easily into iterative functions

    Here are the programs we saw in class: