Maximum Subarray Problem Binary Search Python