Enter one more number(Press Sort without entering any value to start the animation):
The increments considered are 5,3,1

*-Press submit after entering every value of the array

Algorithm for Shell Sort


for(incr=0;incr less_than numinc;incr++)
{
/* span is the size of the increment */
span = incrmnts[incr];
for(j = span; j less_than n;j++)
{
/* insert element x[j] into its proper */
/* position within its subfile */
y = x[j];
for(k=j-span; k>=0 && y less_than x[k]; k-=span)
{
x[k+span]=y;
}
x[k+span]=y;
}
}