Course Home | Homework | Programming | Schedule & Lecture Notes | Submit

Saint Louis University

Computer Science 180
Data Structures

Michael Goldwasser

Spring 2006

Dept. of Math & Computer Science

Homework Assignment 06

List and Sequence ADTs

Contents:


Overview

Topic: List and Sequence ADT
Related Reading: Ch. 5.2-5.3 and 5.5-5.6
Due: Tuesday, 11 April 2006, 1:10pm

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).


Michael Goldwasser
CSCI 180, Spring 2006
Last modified: Saturday, 01 April 2006
301 Moved Permanently

Moved Permanently

The document has moved here.


Apache/2.4.57 (Red Hat Enterprise Linux) OpenSSL/3.0.7 PHP/8.0.30 Server at cs.slu.edu Port 443