#### 基數排序法的過程

##### LSD──遞增或遞減排序

索引    0   1   2   3   4   5   6   7   8   9

索引    0   1   2   3   4   5   6   7   8   9

9   1   0   8   9   2   7   1   2   9   ●

索引    0   1   2   3   4   5   6   7   8   9

0   1   1   2   2   7   8   9   9   9   ○

索引    0   1   2   3   4   5   6   7   8   9

2   9   0   2   8   7   1   9   9   1   ○

##### MSD──辭典排序

索引    0   1   2   3   4   5   6   7   8   9

桶子號碼    0   1   2   3   4   5   6   7   8   9

[69, 81, 30, 38, 9, 2, 47, 61, 32, 79]

[69, 81, 30, 38, 9, 2, 47, 61, 32, 79]
○            ○            ○            ●

[69, 81, 30, 38, 9, 2, 47, 61, 32, 79] -> [30, 38, 32]

[69, 81, 30, 38, 9, 2, 47, 61, 32, 79] -> [30, 38, 32]
○            ○            ○            ○            ○            ○            ○            ○            ○             ○

[69, 81, 30, 38, 9, 2, 47, 61, 32, 79]
○            ○            ○            ○

[69, 81, 30, 38, 9, 2, 47, 61, 32, 79]
○            ○            ○            ○            ○            ○            ●

[69, 81, 30, 38, 9, 2, 47, 61, 32, 79] -> [69, 61]

[69, 81, 30, 38, 9, 2, 47, 61, 32, 79] -> [69, 61]
○            ○            ○            ○            ○            ○            ○            ○            ○             ○

[69, 81, 30, 38, 9, 2, 47, 61, 32, 79]
○            ○            ○            ○            ○            ○            ○

[69, 81, 30, 38, 9, 2, 47, 61, 32, 79]
○            ○            ○            ○            ○            ○            ○            ○            ○             ○

[69, 81, 30, 38, 9, 2, 47, 61, 32, 79]
○            ○            ○            ○            ○            ○            ○            ○            ○             ○

└───────────────────────────────┬───────────────────────────────┘
[2, 30, 32, 38, 47, 61, 69, 79, 81, 9]