P3
Do counting sort to sort the array of (row,col) positions in
increasing order by column. Show the "C" array of counts that
is produced, as well as the array "C" after the summing step
and, of course, show the sorted output array.
(4,2), (4,0), (3,2), (2,4), (0,0), (1,2), (4,4)
P4
Show what the parition algorithm would produce on the following
input. Clearly state what k value would be return, and show
what array A looks like after partition is done.
... d c j b f a h i e g ...
---------------------------------------
... 12 13 14 15 16 17 18 19 20 21 ...