/quicksort

Primary LanguageGoMIT LicenseMIT

quicksort

time complexity

O(n log n)

steps

  1. pick a random pivot, partician the array
  2. swap anything smaller with the pivot to the left half
  3. call quicksort on the left half
  4. call quicksort on the right half