### Steven J. Zeil

Old Dominion University, Dept. of Computer
Science

Copyright © 1999-2007 Steven J. Zeil, Old Dominion University

In an earlier lesson, we saw:

**Theorem**: Any sorting algorithm that
only swaps adjacent elements has average time no faster than `O(n^{2})`.

So, if we want to sort in time faster than `O(n^{2})`, we can't do it by only swapping adjacent elements. The
obvious way around this limitation is to compare and, when necessary,
exchange distant objects.

The Shell sort (named for its inventor, Donald Shell) is an early and
interesting attempt to do this.

## In the Forum: