input: Write a python function to sort the array using Merge sort.
  assert mergeSort([38, 27, 43, 3, 9, 82, 10]) == [3, 9, 10, 27, 38, 43, 82]
  assert mergeSort([5, 2, 9, 1, 5, 6]) == [1, 2, 5, 5, 6, 9]
  assert mergeSort([12, 11, 13, 5, 6, 7]) == [5, 6, 7, 11, 12, 13]
output: def mergeSort(arr):
      if len(arr) <= 1:
          return arr
  
      mid = len(arr) // 2
      left_half = mergeSort(arr[:mid])
      right_half = mergeSort(arr[mid:])
  
      return merge(left_half, right_half)
  
  def merge(left, right):
      result = []
      i = j = 0
  
      while i < len(left) and j < len(right):
          if left[i] < right[j]:
              result.append(left[i])
              i += 1
          else:
              result.append(right[j])
              j += 1
  
      result.extend(left[i:])
      result.extend(right[j:])
      return result