CareerCup 5th 2.3 Max Sum Sequence

Approach 1: linear time. If the sum<0, it doesn’t contribute to the
max. When find a max, record the start and end.