Shell Sort 2

We now slice the array into a different number of slices. For this example we will use five slices, but other values are possible.

ADS 03 P2 C&D

Slicing this into five we get:

ADS 03 P2 EAgain we sort each column to give:

ADS 03 P2 F

Logically reassembling, we now have the dataset:

ADS 03 P2 G

Notice that the data set is starting to look much more sorted than it was before.

Next: Shell Sort 3