Solution to Maximum Subarray with Kadane