<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">This algorithm realises the searching method for maximum subarray by changing the initial value when the sum is below 0.</span>
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">The C++ code shows as follow:</span>