comefrom: <garvit244>152_1.py
code: def maxProduct( nums):
      if not nums:
          return 0
      
      max_so_far, min_so_far, result = nums[0], nums[0], nums[0]
      
      for index in range(1, len(nums)):
          if nums[index] > 0:
              max_so_far = max(max_so_far*nums[index], nums[index])
              min_so_far = min(min_so_far*nums[index], nums[index])
          else:
              temp = max_so_far
              max_so_far = max(min_so_far*nums[index], nums[index])
              min_so_far = min(temp*nums[index], nums[index])
      
          result = max(result, max_so_far)
      return result
masked: def sample_funcname ( var_0 ) :
      if not var_0 :
          return 0
      var_2 , var_3 , var_4 = var_0 [ 0 ] , var_0 [ 0 ] , var_0 [ 0 ]
      for var_8 in range ( 1 , len ( var_0 ) ) :
          if var_0 [ var_8 ] > 0 :
              var_2 = max ( var_2 * var_0 [ var_8 ] , var_0 [ var_8 ] )
              var_3 = min ( var_3 * var_0 [ var_8 ] , var_0 [ var_8 ] )
          else :
              var_11 = var_2
              var_2 = max ( var_3 * var_0 [ var_8 ] , var_0 [ var_8 ] )
              var_3 = min ( var_11 * var_0 [ var_8 ] , var_0 [ var_8 ] )
          var_4 = max ( var_4 , var_2 )
      return var_4
  