Core idea
Shell Sort starts with large gaps between compared elements and gradually reduces those gaps to 1.
Each pass performs an insertion-like sort over elements that belong to the same gap sequence.
It is a classic optimization over insertion sort and a good example of how preprocessing can reduce later work.