input: Write a function to sort an integer array using the Insertion Sort algorithm. The function should return the sorted array.
  assert insertionSort([3, 4, 5, 1, 2])==[1, 2, 3, 4, 5]
  assert insertionSort([2, 3, 1])==[1, 2, 3]
  assert insertionSort([1])==[1]
  assert insertionSort([])==[]
  assert insertionSort([5, -1, 3, 2, 4])==[-1, 2, 3, 4, 5]
output: def insertionSort(arr):
      for i in range(1, len(arr)):
          key = arr[i]
          j = i - 1
          while j >= 0 and key < arr[j]:
              arr[j + 1] = arr[j]
              j -= 1
          arr[j + 1] = key
      return arr