< Previous Next >
[Array] [Dynamic Programming]
Hint 1
How can Kadane's Algorithm help us? Hint 2
If you convert all the numbers at odd indices to the negative version of that number, the problem simplifies to finding the maximum subarray sum. Hint 3
However, this strategy needs you to start each subarray at an even index. Hint 4
Do the same except converting all the numbers at even indices to the negative version of that number.