input: 
  def split_equal_sum(arr):
      n = len(arr)
      leftsum = 0
      rightsum = sum(arr)
      
      for i in range(n):
          rightsum -= arr[i]
          if leftsum == rightsum:
              return True
          leftsum += arr[i]
      return False
  
  """ Check if a given array can be split into two parts with equal sums.
  >>> split_equal_sum([1, 2, 3, 4])
  True
  
  >>> split_equal_sum([1, 2, 3, 5])
  False
  """
  
output:     n = len(arr)
      leftsum = 0
      rightsum = sum(arr)
      
      for i in range(n):
          rightsum -= arr[i]
          if leftsum == rightsum:
              return True
          leftsum += arr[i]
      return False