Kadane's Algorithm.