A problem of max subarray. It's been solved in O(N) time.