Sorting algorithms

Lessons in this group, roughly in build order:

  • shell-sort — A gap-based generalization of insertion-sort that first sorts elements far apart, then shrinks the gap to…
  • radix-sort — A non-comparison sort that orders fixed-width keys digit by digit using a stable bucketing pass per digit,…
  • cyclic-sort — An in-place O(n) pattern that places each value into its index-determined home by repeated swaps,…
  • random-shuffle — The inverse of sorting: producing a uniformly random permutation of an array in O(n) using the…