Sortingcore
Shell Sort
A generalisation of insertion sort that first sorts elements far apart, then progressively shrinks the gap. The early long-range moves let later passes finish quickly. Performance depends heavily on the gap sequence.
- Best
- O(n log n)
- Average
- O(n^1.25)
- Worst
- O(n²)
- Space
- O(1)
- Stable
- No