[an error occurred while processing this directive]
Saint Louis University

CS A 220
Computer Science II
Michael Goldwasser

Fall 2003

Dept. of Mathematics and
Mathematical Computer Science


Homework Assignment 02

Asymptotics and Singly Linked Lists

Contents:

  • Overview
  • Practice Problems
  • Problems to be Submitted
  • Extra Credit

  • Overview

    Topic: Asymptotics and Singly Linked Lists
    Related Reading: Ch. 3 and Ch. 4.3
    Due: 6pm Thursday, 12 September 2002

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


    Practice Problems

  • Creativity Exercise C-3.1 of the text.
  • Reinforcement Exercise R-3.8 of the text.
  • Reinforcement Exercise R-4.4 of the text.

  • 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)
      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.5 of the text.
      Please give your answer as Java code.

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


    Extra Credit

    1. (2 points)
      Creativity Exercise C-4.9 of the text.
      (Hint available through Hint Server on textbook's website).


    CS A 220, Fall 2003
    Michael Goldwasser
    goldwamh nbsp; @   slu.edu


    [an error occurred while processing this directive]