Shell Sort
Shell Sort Shell sort extends insertion sort by allowing exchanges of elements that are far apart. It sorts elements at a certain gap, then progressively reduces the gap until it becomes 1. The final pass with gap 1 is a standard insertion sort, but on a partially ordered array. This reduces the number of shifts required compared to plain insertion sort. Problem Given a sequence $A$ of length $n$, reorder...