Mental Model
Shell sort improves simple sorting by comparing elements far apart first, then reducing the gap to sort closer elements, making the list more sorted step by step.
Analogy: Imagine organizing books on a shelf by first comparing books far apart, then gradually comparing books closer together until all are in order.
Array: [8, 5, 3, 7, 6, 2, 4, 1] Initial gap: 4 Indexes compared: 0 -> 4, 1 -> 5, 2 -> 6, 3 -> 7
