CS 226: Homework 2

This assignment is due by Monday, November 15 at 11:59 pm. You should work independently (not in pairs or teams). Submit your solution as a MS Word file (.doc) or an Adobe Acrobat file (.pdf) (useful if you want to work in LaTex or some other editor).  Pictures and equations may, for example, be done with the tools in Word or other digital tools, or you can write/draw neatly on paper, scan, and insert as an image. There is no need to zip this file. (If you want to submit in some alternative format, please contact the TA in advance for permission).

(For problems from the textbook, you have permission to use the hints at http://java.datastructures.net)

1. Chapter 6, exercise R-6.14, p. 294 (3rd edition)

2. Chapter 6, exercise C-6.19, p. 298 (3rd edition)

3. Chapter 6, exercise C-6.20, p. 299 (3rd edition)

4. Chapter 7, exercise R-7.6, p. 347 (3rd edition) - Also explain why.

5. Chapter 7, exercise C-7.18, p. 351 (3rd edition)

6. Chapter 8, exercise C-8.7, p. 403 (3rd edition) - Also, describe the efficiency of the algorithm.

7. Chapter 8, exercise C-8.17, p. 404 (3rd edition) - Also describe any modifications you need to make to insert, remove, and find, and show that they are still O(logn) as well.