End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
dp with -1 to indicate uncalculated subproblems.solve that takes the starting and ending indices of the current subarray.solve for the appropriate subarray and update the maximum score.solve with the full range of the array and return the result as the final answer.