--

maxSum and tempSum are 0. Therefor, since maxSum is still 0 after the first for loop, you're just resetting it. Therefor, you don't need to reassign tempSum or the first for loop.

--

--

No responses yet