Running sum
Perhaps I'm missing something, but isn't the maximum of the cumulative sum simply the last value, ie. sum(x)?
As many have mentioned, I was forgetting the negative numbers. Thanks to those who pointed that out. Hadley
Perhaps I'm missing something, but isn't the maximum of the cumulative sum simply the last value, ie. sum(x)?
As many have mentioned, I was forgetting the negative numbers. Thanks to those who pointed that out. Hadley