Do either of the following modifications to the Shellsort routine coded in Figure 7.4 affect the worst-case

Question:

Do either of the following modifications to the Shellsort routine coded in Figure 7.4 affect the worst-case running time?
/** * Shellsort, using Shell's (poor) increments. 3 * @param a an array of Comparable items. 4 */ public static <AnyType

a. Before line 11, subtract one from gap if it is even.
b. Before line 11, add one to gap if it is even.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: