Find the maximum profit when the first i items are sold in market A and the rest of the items are sold in market B for all possible values of i
for i in range ( 1 , n - 1 ) : NEW_LINE INDENT res = max ( res , preSum [ i ] + suffSum [ i + 1 ] ) ; NEW_LINE DEDENT