Shell sort
mediumSort elements that are `gap` apart first, so a badly-placed value jumps most of the distance in one hop, then finish with a gap of 1 on data that is now nearly ordered. The gap sequence is the whole algorithm.
Best
O(n log n)Average depends on the gapsWorst O(n²)Space O(1)Not stableIn placeLoading the shell sort engine…