Dynamic programming
Dynamic programming, Kadane algorithm, tricky