previous | start | next

Key Index Counting Example

Consider sorting the 3 digit numbers:

      
 412
 012
 101
 432
 302
 201
 410
   

The idea to make 3 passes (in this case, since these are 3 digit numbers) starting with the least significant digit (LSD) on the first pass.

After the k-th pass, the elements will be in sorted order if only the last k digits are considered.



previous | start | next