Note: on the answer sheet given out after the final exam, the answer for part 2 of Problem 3 was erroneously given as TreeMap. The correct answer is HashMap. -- JDS