CS 107 S01 Homework 2

Due Friday 4/13 at the beginning of class

No late assignments will be accepted

All problems are to be implemented.

  1. (30 points) CHV page 209 #6. (Merge two sorted lists)
    For hard copy use the data:
        List1: 1, 6, 15, 19, 22
        List2: -5, 0, 6, 17, 50

  2. (30 points) CHV page 212 #5. (Strings as linked lists)
    For hard copy, exercise your program on some interesting data.
    Part of your grade will be based on the design of your test data.

  3. (40 points) Write a recursive program to determine if a string is a palindrome, ignoring blanks, punctuation and capitalization. For example, both

    radAR

    and

    Madam, I'm Adam.

    are palindromes.

    Example output:
    Yes, "radAR" is a palindrome.
    No, "The quick brown fox jumped" is not a palindrome.

    On Wednesday, April 11, I will post some data for the palindrome problem on the website. For the hard copy, you must use those data.