Notes- Shell Sort

Algorithm

Initialize the GAP to COUNT DIV 2 

loop while the GAP is greater than zero

set SWAPMADE to True

loop while SWAPMADE is True

set SWAPMADE to Falce

for CURRENT from 1 to COUNT less GAP 

if the CURRENT element is greater than the CURRENT + GAP element then 

Swap the two elements

Set SWAPMADE to True

endif

end for

end loop Determine the new GAP by dividing GAP by 2