Sorting
Quicksort
- if the array length is ≤ 1, return the array
- take a pivot (last element or any random element and take it out of the array)
- iterate through the array
- if current element > pivot, put in right array
- if current element < pivot, put in left array
- return quicksort(leftArray), pivot, quicksort(rightarray)