input: Write a function to find the missing number in an array containing numbers from 1 to n.
  assert missingNumber([2, 3, 1, 5, 4]) == 6
  assert missingNumber([1, 2, 4, 6, 3]) == 5
  assert missingNumber([7, 8, 10, 9, 6, 5, 4, 3, 2, 1]) == 11
output: def missingNumber(arr):
      n = len(arr) + 1
      total = n * (n + 1) / 2
      sum_of_array = sum(arr)
      return int(total - sum_of_array)