Sorting

Sorting

This chapter covers two advanced approaches to sorting: Shellsort and Quicksort.

These sorts both operate much faster than the simple sorts: the Shellsort in about O(N*(logN)^2) time, and quicksort in O(N*logN) time.

Neither of these sorts requires a large amount of extra space, as mergesort does. The Shellsort is almost as easy to implement as mergesort, while quicksort is the fastest of all the general-purpose sorts.

Examples in this chapter:

  1. Shell Sort
  2. Partion
  3. Quick Sort 1
  4. Quick Sort 2