Quick sort is a Divide and Conquer algorithm that picks an element as a pivot and partitions the array around the pivot element.

  1. Choose a pivot (median or random point)
  2. Partition the array (using split) by rearranging the array around the pivot. After partitioning, all elements smaller than the pivot will be on its left, and those larger will be on the right.
  3. Recursively apply the process on the two partitioned sub-arrays
  4. The recursion stops when there is only one element left in the sub-array

This typically outperforms merge sort.