comefrom: <garvit244>1186_1.py
code: def maximumSum( arr):
      forward = [0] * len(arr)
      backward = [0] * len(arr)
      
      curr_max, max_so_far = arr[0], arr[0]
      forward[0] = arr[0]
      for index in range(1, len(arr)):
          curr_max = max(arr[index], curr_max + arr[index])
          max_so_far = max(max_so_far, curr_max)
          
          forward[index] = curr_max
          
      curr_max = arr[len(arr) - 1]
      max_so_far = arr[len(arr) - 1]
      backward[len(arr) - 1] = arr[len(arr) - 1]
      
      index = len(arr) - 2
      while index >= 0:
          curr_max = max(arr[index], curr_max + arr[index])
          max_so_far = max(max_so_far, curr_max)
          
          backward[index] = curr_max
          index -= 1
          
      result = max_so_far
      for index in range(1, len(arr)-1):
          result = max(result, forward[index-1] + backward[index + 1])
      return result
masked: def sample_funcname ( var_0 ) :
      var_3 = [ 0 ] * len ( var_0 )
      var_4 = [ 0 ] * len ( var_0 )
      var_5 , var_6 = var_0 [ 0 ] , var_0 [ 0 ]
      var_3 [ 0 ] = var_0 [ 0 ]
      for var_9 in range ( 1 , len ( var_0 ) ) :
          var_5 = max ( var_0 [ var_9 ] , var_5 + var_0 [ var_9 ] )
          var_6 = max ( var_6 , var_5 )
          var_3 [ var_9 ] = var_5
      var_5 = var_0 [ len ( var_0 ) - 1 ]
      var_6 = var_0 [ len ( var_0 ) - 1 ]
      var_4 [ len ( var_0 ) - 1 ] = var_0 [ len ( var_0 ) - 1 ]
      var_9 = len ( var_0 ) - 2
      while var_9 >= 0 :
          var_5 = max ( var_0 [ var_9 ] , var_5 + var_0 [ var_9 ] )
          var_6 = max ( var_6 , var_5 )
          var_4 [ var_9 ] = var_5
          var_9 -= 1
      var_12 = var_6
      for var_9 in range ( 1 , len ( var_0 ) - 1 ) :
          var_12 = max ( var_12 , var_3 [ var_9 - 1 ] + var_4 [ var_9 + 1 ] )
      return var_12
  