Skip to main content

D&C (Divide & Conquer)

  • D&C is used breaking a problem into smaller pieces
  • The base case is probably an empty array or an array with 1 element

Quicksort

  • Choose a random value as pivot. Average runtime: O(n logn)
  • The quicksort is faster than merge sort because the constants in big O