Shell Sort
A generalization of insertion sort that repeats gapped insertion while progressively shrinking the gap, moving distant elements efficiently. Performance hinges on the gap sequence.
01 Explore How It Works
Interactive Step-by-Step쉘 정렬을 시작합니다. 간격(gap)을 줄여가며 간격을 둔 삽입 정렬을 반복합니다. n=8, gap = n/2 = 4.
02 Understand It Simply
For EveryoneRoughly align far-apart cards first, then tidy up more finely as the gap narrows.
Sorts elements spaced by a gap first, then reduces the gap to finish.
A big improvement over plain insertion sort.
- –Medium-sized data
- –memory-constrained environments
03 Python Implementation
A clean, readable reference implementation of the core logic of Shell Sort.
04 Frequently Asked Questions
FAQWhat is Shell Sort?+
A generalization of insertion sort that repeats gapped insertion while progressively shrinking the gap, moving distant elements efficiently. Performance hinges on the gap sequence.
What is the time complexity of Shell Sort?+
The time complexity of Shell Sort is O(n log² n). Follow the step-by-step visualization to see exactly why.
Where is Shell Sort used?+
Medium-sized data, memory-constrained environments.
What's a simple analogy for Shell Sort?+
Roughly align far-apart cards first, then tidy up more finely as the gap narrows.
