Summary
In this chapter we discussed several of the more common sorting algorithms you might encounter in your day-to-day experience. We started with several comparison sorts including selection, insertion, and bubble. We noted that a selection sort is perhaps the most inefficient sorting algorithm you are likely to encounter in the real world, but that's not to say that it is completely academic. Insertion sort somewhat improves on selection, as does the bubble sorting algorithm. Next, we examined two divide and conquer sorting algorithms including quick sort and merge sort. Both of these approaches are much more efficient than comparison sorts. Finally, we explored a common and highly efficient distribution sort called the counting sort. The counting sort is the most efficient algorithm we examined, but it is not necessarily the best fit for every situation.