finish max sub array