1. Wednesday, 10/7/2009 Notes

    In lecture today the following topics were covered:

    • a brief review of tail recursion and the benefits of tail recursion
    • discussion of the searching problem (findInArray)
    • discussion of searching in a sorted list (such as the phone book) and the possible costs of searching
    • introduction of the binary search algorithm and a recursive implementation of binary search

    Here’s an implementation of binary search: binarySearch.cpp and a small set of data you might want to search: smallArray.txt