You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.