input: Write a function to sort an array using the quicksort algorithm.
  assert quickSort([3, 6, 8, 10, 1, 2, 1]) == [1, 1, 2, 3, 6, 8, 10]
  assert quickSort([5, 3, 8, 4, 2]) == [2, 3, 4, 5, 8]
  assert quickSort([12, 4, 5, 6, 7, 3, 1, 15]) == [1, 3, 4, 5, 6, 7, 12, 15]
output: def quickSort(arr):
      if len(arr) <= 1:
          return arr
      pivot = arr[len(arr) // 2]
      left = [x for x in arr if x < pivot]
      middle = [x for x in arr if x == pivot]
      right = [x for x in arr if x > pivot]
      return quickSort(left) + middle + quickSort(right)