Mental Model
Shell sort improves simple sorting by comparing elements far apart first, then reducing the gap to sort closer elements.
Analogy: Imagine organizing books on a shelf by first sorting every 5th book, then every 3rd, and finally every book next to each other to get a fully sorted shelf.
Array: [8, 5, 3, 7, 6, 2, 4, 1] Gap: 4 Indexes compared: 0 -> 4, 1 -> 5, 2 -> 6, 3 -> 7
