Do either of the following modifications to the Shellsort routine coded in Figure affect the worst-case running time?
a. Before line 8, subtract one from gap if it is even.
b. Before line 8, add one to gap if it is even.
Figure: Shellsort routine using Shell’s increments (better increments are possible)
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.