(1) Create M empty bins, B[0] - B[M-1] (2) for each item in the list (3) place the item into B[k], where k is the key (4) For i = 0 to M-1 (5) foreach item in B[i] (6) remove item (7) place it in next available space.
(1) for i = 0 to d (2) use any stable sort to sort on the digit di
328 321 101 101 382 101 901 198 321 901 321 321 198 Sort on 1's 382 Sort on 10's 328 Sort on 100's 328 899 ----------> 328 ------------> 382 ------------> 387 101 place 198 place 198 Place 899 901 899 899 901