Homework 2
Due Dates:
 Sections 1 & 3: Thursday, September 26, in class.
 Sections 2 & 4: Monday, September 30, in class.
Referenced exercises are from Data Structures and Algorithm Analysis in Java by Mark A. Weiss. Page numbers are for the third edition (3/e) and the second edition (2/e) of the textbook.

Exercise 3.2, parts a & b (3/e: p. 96, 2/e: p. 95).
Note: For part a, assume that the singly linked list has a dummy header node and that the link is stored in a member called next. Also, assume that you are given a reference to the item before the first of the two adjacent items.
For part b, assume the links are in members named next and prev. Also assume that you are given a reference to the first of the two adjacent items.

Exercise 3.7 (3/e p. 97, 2/e p. 96). Briefly justify your answers.

Exercise 3.8, parts a – d (3/e p. 97, 2/e p. 96). Briefly justify your answers.
Additional Instructions: For part a, what would happen if the for loop was written as?
for (int i = 0 ; i < lst.size()/2 ; i++) { lst.remove(0) ; }
How much of the list would be removed? Why?