Kadanes Algorithm Maximum Subarray Problem