Shell Sort
Shell Sort
18 32 12 5 38 33 16
(visualize colors)
2
2
32
12
38
33
16
Step 1) Look at 18, 12, 38, 16 and sort them in their appropriate location:
12
38
16
18
33
38
Step 2) Look at 32, 2, 33, 5 and sort them in their appropriate location:
12
16
18
32
38
33
16
18
32
38
33
12
16
18
32
33
38