# Category:Shell sort

From LiteratePrograms

Shell sort is a relatively simple sorting algorithm based on insertion sort. It operates by taking every *k*th element of the list and performing an insertion sort on this subset. It does this for several decreasing values of *k*, such as 23, 10, 4, and 1, until *k*=1, at which point it is performing insertion sort; but the previous iterations moved each element closer to its final position, speeding up this final pass dramatically.