input: Write a python function to perform quick sort.
  assert QuickSort([10, 7, 8, 9, 1, 5]) == [1, 5, 7, 8, 9, 10]
  assert QuickSort([3, 6, 8, 10, 1, 2, 1]) == [1, 1, 2, 3, 6, 8, 10]
  assert QuickSort([1, 4, 3, 5, 6, 2]) == [1, 2, 3, 4, 5, 6]
  assert QuickSort([]) == []
  assert QuickSort([3]) == [3]
output: def QuickSort(arr):
      if len(arr) <= 1:
          return arr
      else:
          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)