next up previous
Next: Up: Previous:

Example

Let array A be the following array (n=8, k=7).

\(1 \ldots n\)
5 7 3 5 2 1 4 3



Compute C[j] as the number of elements in A[] $\leq$ j. Array C is thus the following array.

Click mouse to advance to next frame.

Array B contains the final sorted array.



1 2 3 3 4 5 5 7


next up previous
Next: Up: Previous: