Thanksgiving Sale: Use Coupon Code THANKS25 to Get Extra 25% Off.
max_sum, pos, and neg to negative infinity.num in the array nums.pos to be the maximum of neg + num or num.neg to be pos - num.max_sum to be the maximum of max_sum, pos, and neg.max_sum as the result.