CPSC 220
Fall 2007
HW 2: More Review

  1. Re-do problems 3c, 3d, 3e, and 3f from HW 1. Be sure you are comfortable with both your exact and your big-O answers.

  2. Write Java code to add an element x to the end of a linked list. Assume that class LinearNode is defined as on page 128 and that LinearNode variable front refers to the front of the list.

  3. L&C Exercise 10.5.

  4. Simplify each expression below as much as possible:
    1. (3x)(3y)
    2. (3x)y
    3. (3x)(9y)
    4. log(xy)
    5. log(xy)
    6. log2(8n2)
    7. log2(10n/4)