create and build an array that stores minimum sums of subarrays that lie in arr [ 0. . . i ]
leftMin = [ 0 for i in range ( n ) ] NEW_LINE maxLeftSubArraySum ( invertArr , n , leftMin ) NEW_LINE for i in range ( n ) : NEW_LINE INDENT leftMin [ i ] = - leftMin [ i ] NEW_LINE DEDENT