Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In 1959. the American computer scientist Donald Shell invented a technique that

ID: 3694748 • Letter: I

Question

In 1959. the American computer scientist Donald Shell invented a technique that can be used to speed up many different sorting algorithms, l or this project, you will apply method to insertion sort. The basis of the technique is to get the items to move in big steps (rather than shifting elements the next-higher index). These big-step shifts are done early in the algorithm, and they tend to put the array in nearly sorted order. Later in the algorithm, we use smaller steps (all the way down to steps of size one, just like an ordinary insertionsort). But by the time that the small steps are being taken, the array is nearly sorted, and that's a situation where insertionsort is efficient. The choice of the various step sizes affects the performance of the algorithm, but one sequence that is empirically good starts at n/2, and each subsequent step size is about the previous size divided by 2.2. The overall pseudocode is given here:

Explanation / Answer

#include #include using namespace std; int main() { int c[16], i, j, k, t; coutc[i]; } for (i = 1; i < 16; i++) { for (j = i; j >= 1; j--) { if (c[j]