Homework Assignment

List and Sequence ADTs

Contents:


Overview

Topic: List and Sequence ADT
Related Reading: Ch. 5.2-5.3 and 5.5-5.6
Due:

Please make sure you adhere to the policies on academic integrity.


Practice Problems


Problems to be Submitted (20 points)

  1. (7 points)

    Reinforcement Exercise R-5.10 on page 246 of the text.

  2. (6 points)

    Creativity Exercise C-5.11 on page 248 of the text.

  3. (7 points)

    Using the List interface methods, use recursion to implement a function

    bool search(const List<Object>& L, Object k)
    which determines whether value k is on the list. You may assume that the equality operator (==) is defined for the Object type..

    If the public signature is inconvenient, you are free to define your own private method for the recursion, so long as the public interface is supported.

    How much auxillary space does your function use in addition to the space used for L?


Extra Credit

  1. (2 points)

    Creativity Exercise C-5.12 of the text.
    (Hint available through Hint Server on textbook's website).


Last modified: Saturday, 01 April 2006