All exercies and problems refer to the textbook. Version 3.
Homework 1 (due Nov 2)
Notes:
The concept of algorithm stability is explained in top of page 170.
Using example of Figure 8.2, show that all three "3" elements
from A moved to B in the same order, which means the algorithm is "stable".
Is merge sort stable? Is quicksort stable? Is there a way to fix the problem?
Algorithm stability is crucial for the correctness of Radix sort.
Exercises 8.3-1, through 8.3-4.
Notes:
Show that if you sort the most significant bit first, the result is wrong.
Use the example in Figure 8.3
Exercises 15.4-5. (We discussed this problem in class)