comefrom: <garvit244>123_1.py
code: def maxProfit( prices):
      if len(prices) < 2:
          return 0
      dp = [[0 for _ in range(len(prices))] for _ in range(3)]
      for i in range(1,3):
          maxDiff = -prices[0]
          for j in range(1,len(prices)):
              dp[i][j] = max(dp[i][j-1], prices[j] + maxDiff)
              maxDiff = max(maxDiff, dp[i-1][j] -prices[j])
      
      return dp[2][len(prices)-1]
masked: def sample_funcname ( var_0 ) :
      if len ( var_0 ) < 2 :
          return 0
      var_7 = [ [ 0 for var_4 in range ( len ( var_0 ) ) ] for var_4 in range ( 3 ) ]
      for var_9 in range ( 1 , 3 ) :
          var_10 = - var_0 [ 0 ]
          for var_11 in range ( 1 , len ( var_0 ) ) :
              var_7 [ var_9 ] [ var_11 ] = max ( var_7 [ var_9 ] [ var_11 - 1 ] , var_0 [ var_11 ] + var_10 )
              var_10 = max ( var_10 , var_7 [ var_9 - 1 ] [ var_11 ] - var_0 [ var_11 ] )
      return var_7 [ 2 ] [ len ( var_0 ) - 1 ]
  