Sorting Conclusions

That's it! There are other sorting algorithms (e.g. shell sort, block sort), but we won't be discussing them in this class.

Remember, here's the criteria by which we judged our sorting algorithms:

  1. Time complexity
  2. Space complexity
  3. Adaptivitiy
  4. Stability
  5. Simplicity
No one algorithm wins in all the categories, but here are the rough take-away points:
  1. Merge sort comes the closest to being the all-around best. When in doubt, use it.
  2. Quick sort can be better, but it's not stable, and you need to take steps to ensure you don't use it for sorted data.
  3. For semi-sorted data, insertion sort is the most adaptive sort.

Here they all are, one last time: