Exercise 8.4.1
Using figure 8.4 as a model, illustrate the operation of
BUCKET-SORT
on the array $A = \langle .79, .13, .16, .64, .39, .20, .89, .53, .71, .42 \rangle$.
A B
+-----+ +---+
1 | .79 | 0 | / |
+-----+ +---+
2 | .13 | 1 | o-----> (.13 .16)
+-----+ +---+
3 | .16 | 2 | o-----> (.20)
+-----+ +---+
4 | .64 | 3 | o-----> (.39)
+-----+ +---+
5 | .39 | 4 | o-----> (.42)
+-----+ +---+
6 | .20 | 5 | o-----> (.53)
+-----+ +---+
7 | .89 | 6 | o-----> (.64)
+-----+ +---+
8 | .53 | 7 | o-----> (.71 .79)
+-----+ +---+
9 | .71 | 8 | o-----> (.89)
+-----+ +---+
10 | .42 | 9 | / |
+-----+ +---+