Sorting Overview

Many different basic sorting algorithms exist. Each of these algorithms has unique characteristics, behaviors, and requirements. For example, for the same set of data, one algorithm may perform far fewer comparisons than another algorithm. Similarly, during execution another algorithm may swap the positions of data items far less often than another algorithm. The behavior of some algorithms differ when presented with data that is almost sorted as opposed to data that is completely shuffled. It is the differences between the set of these properties that make each sorting algorithm unique. These characteristics also make an algorithm more or less applicable in certain situations.

Because professional programmers rarely use basic sorting algorithms, we examine only one algorithm in this page. In page 4.1.3 Fast Sorting Algorithms, we examine a sorting algorithm that is typically faster than all basic sorting algorithms.