1. Write the process of
COUNTING-SORT on the
following data.
A={6, 0, 2, 0, 1, 3, 4, 6,
1, 3, 2}.
2. Suppose that the for loop header in line 9 of the
COUNTING-SORT procedure is rewritten
as
9 for j <-- 1 to length[A]
Show that the algorithm still
works properly. Is modified algorithm stable?
3. Write the process of
RADIX-SORT on the following list of
English words:
COW, DOG, SEA, RUG, ROW,
MOB, BOX, TAB, BAR,
EAR, TAR, DIG, BIG, TEA, NOW, FOX.