find the minimize sum of sub array