For example, given
A = [1,51,3,1,100,199,3], maxSum = 51 + 1 + 199 = 251.
clearly max(oddIndexSum,evenIndexSum) does not
max(oddIndexSum,evenIndexSum)
MarkusQ's code appears to completely skip over a[2]. I'm not smart enough to figure out where it should figure into the reckoning.