Finds the Sum of MaxSubArray in 1D array