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

Saint Louis University

Computer Science 220
Computer Science II
Michael Goldwasser

Fall 2004

Dept. of Math & Computer Science

Homework Assignment 03

Asymptotics and Singly Linked Lists

Contents:


Overview

Topic: Asymptotics and Singly Linked Lists
Related Reading: Ch. 3 and Ch. 4.4
Due: 9:30am Tuesday, 28 September 2004

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


Practice Problems


Problems to be Submitted (20 points)

  1. (5 points)

    Reinforcement Exercise R-3.2 of the text.
    Please make sure that you provide the smallest such n0.

    Also, please note that this problem does NOT involve Big-Oh notation, rather it involves the raw growth rates, similar to those given in Table 3.2. The authors explain on page 103 that when they write the expression log n, they mean by default log2 n, the binary logarithm. This is the standard assumption throughout computer science for several reasons, most notably that all numbers are represented internally in binary (as opposed to decimal).

  2. (5 points)

    Reinforcement Exercise R-3.3 of the text.
    See note for previous problem.

  3. (5 points)

    Reinforcement Exercise R-3.3 of the text.
    Solve Reinforcement Exercises R-3.20, R-3.21, R-3.22, R-3.23, and R-3.24 of the text. Please strive to give answers in simplest terms, as discussed at the top of page 118.

  4. (5 points)

    Reinforcement Exercise R-4.12 of the text.
    Please give your answer as a C++ method which takes the head of the linked list as a parameter.

    (Note: the ``penultimate'' node is defined as the second-to-last node of the list).


Extra Credit

  1. (2 points)

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


CSA-220, Fall 2004
Michael Goldwasser
goldwamh at our university domain.

Last modified: Tuesday, 12 October 2004
Class Photo | Course Home | Homework | Programming | Schedule & Lecture Notes | Submit