table continued * ( - there are other approaches to generating the interval sequencewe'll return to this issue later firstwe'll explore how the shellsort works using knuth' sequence in the sorting algorithmthe sequence-generating formula is first used in short loop to figure out the initial gap value of is used for the first value of hand the = * + formula is applied to generate the sequence and so on this process ends when the gap is larger than the array for , -element arraythe seventh number in the sequence , is too large thuswe begin the sorting process with the sixth-largest numbercreating -sort theneach time through the outer loop of the sorting routinewe reduce the interval using the inverse of the formula previously givenh ( - this is shown in the third column of table this inverse formula generates the reverse sequence starting with each of these numbers is used to -sort the array when the array has been -sortedthe algorithm is done the shellsort workshop applet you can use the shellsort workshop applet to see how this sort works figure shows the applet after all the bars have been -sortedjust as the -sort begins figure the shellsort workshop applet